Possible fix for timer saving

Possible fix for timer saving on Safari/Chrome on IOS devices(iPhone/iPAD) (#4250)
This commit is contained in:
Theo Arends 2018-11-04 18:29:53 +01:00
parent 82b65de724
commit 39efb2aa53
1 changed files with 3 additions and 4 deletions

View File

@ -647,7 +647,9 @@ const char HTTP_TIMER_STYLE[] PROGMEM =
#endif #endif
"</style>"; "</style>";
const char HTTP_FORM_TIMER[] PROGMEM = const char HTTP_FORM_TIMER[] PROGMEM =
"<fieldset style='min-width:470px;text-align:center;'><legend style='text-align:left;'><b>&nbsp;" D_TIMER_PARAMETERS "&nbsp;</b></legend><form method='post' action='" WEB_HANDLE_TIMER "'>" "<fieldset style='min-width:470px;text-align:center;'>"
"<legend style='text-align:left;'><b>&nbsp;" D_TIMER_PARAMETERS "&nbsp;</b></legend>"
"<form method='post' action='" WEB_HANDLE_TIMER "' onsubmit='return st();'>"
"<br/><input style='width:5%;' id='e0' name='e0' type='checkbox'{e0><b>" D_TIMER_ENABLE "</b><br/><br/><hr/>" "<br/><input style='width:5%;' id='e0' name='e0' type='checkbox'{e0><b>" D_TIMER_ENABLE "</b><br/><br/><hr/>"
"<input id='t0' name='t0' value='"; "<input id='t0' name='t0' value='";
const char HTTP_FORM_TIMER1[] PROGMEM = const char HTTP_FORM_TIMER1[] PROGMEM =
@ -676,8 +678,6 @@ const char HTTP_FORM_TIMER1[] PROGMEM =
"<span><select style='width:60px;' id='mw' name='mw'></select></span>" "<span><select style='width:60px;' id='mw' name='mw'></select></span>"
"</div><br/>" "</div><br/>"
"<div id='ds' name='ds'></div>"; "<div id='ds' name='ds'></div>";
const char HTTP_FORM_TIMER2[] PROGMEM =
"type='submit' onclick='st();this.form.submit();'";
void HandleTimerConfiguration() void HandleTimerConfiguration()
{ {
@ -710,7 +710,6 @@ void HandleTimerConfiguration()
page.replace(F("299"), String(100 + (strlen(D_SUNSET) *12))); // Fix string length to keep radios centered page.replace(F("299"), String(100 + (strlen(D_SUNSET) *12))); // Fix string length to keep radios centered
#endif // USE_SUNRISE #endif // USE_SUNRISE
page += FPSTR(HTTP_FORM_END); page += FPSTR(HTTP_FORM_END);
page.replace(F("type='submit'"), FPSTR(HTTP_FORM_TIMER2));
page += F("<script>it();</script>"); // Init elements and select first tab/button page += F("<script>it();</script>"); // Init elements and select first tab/button
page += FPSTR(HTTP_BTN_CONF); page += FPSTR(HTTP_BTN_CONF);
ShowPage(page); ShowPage(page);