diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index bb3b32dfc..c97825240 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -817,20 +817,18 @@ void WSContentButton(uint32_t title_index, bool show=true) char action[4]; char title[100]; // Large to accomodate UTF-16 as used by Russian + WSContentSend_P(PSTR("

"), - title_index, - show ? "block":"none", - GetTextIndexed(action, sizeof(action), title_index, kButtonAction), + WSContentSend_P(PSTR(" onsubmit='return confirm(\"%s\");'>

"), GetTextIndexed(confirm, sizeof(confirm), title_index, kButtonConfirm), (!title_index) ? PSTR("rst") : PSTR("non"), GetTextIndexed(title, sizeof(title), title_index, kButtonTitle)); } else { - WSContentSend_P(PSTR("

"), - title_index, - show ? "block":"none", - GetTextIndexed(action, sizeof(action), title_index, kButtonAction), + WSContentSend_P(PSTR(">

"), GetTextIndexed(title, sizeof(title), title_index, kButtonTitle)); } } @@ -1925,12 +1923,7 @@ void HandleWifiConfiguration(void) { } } - if (limitScannedNetworks) { - WSContentSend_P(PSTR("
" D_SHOW_MORE_WIFI_NETWORKS "

")); - } else { - WSContentSend_P(PSTR("
" D_SCAN_FOR_WIFI_NETWORKS "

")); - } - + WSContentSend_P(PSTR("
%s

"), (limitScannedNetworks) ? PSTR(D_SHOW_MORE_WIFI_NETWORKS) : PSTR(D_SCAN_FOR_WIFI_NETWORKS)); WSContentSend_P(HTTP_FORM_WIFI_PART1, (WifiIsInManagerMode()) ? "" : PSTR(" (" STA_SSID1 ")"), SettingsText(SET_STASSID1)); if (WifiIsInManagerMode()) { // As WIFI_HOSTNAME may contain %s-%04d it cannot be part of HTTP_FORM_WIFI where it will exception @@ -1944,19 +1937,14 @@ void HandleWifiConfiguration(void) { if (WifiIsInManagerMode()) { #ifndef FIRMWARE_MINIMAL + WSContentSend_P(PSTR("

"), WebColor(COL_TEXT_WARNING)); if (WIFI_TESTING == Web.wifiTest) { - WSContentSend_P(PSTR("

" D_TRYING_TO_CONNECT "
%s

"), - WebColor(COL_TEXT_WARNING), - SettingsText(SET_STASSID1) - ); + WSContentSend_P(PSTR(D_TRYING_TO_CONNECT "
%s

"), SettingsText(SET_STASSID1)); } else if (WIFI_TEST_FINISHED_BAD == Web.wifiTest) { - WSContentSend_P(PSTR("

" D_CONNECT_FAILED_TO " %s
" D_CHECK_CREDENTIALS "

"), - WebColor(COL_TEXT_WARNING), - SettingsText(SET_STASSID1) - ); + WSContentSend_P(PSTR(D_CONNECT_FAILED_TO " %s
" D_CHECK_CREDENTIALS ""), SettingsText(SET_STASSID1)); } // More Options Button - WSContentSend_P(PSTR("

"), + WSContentSend_P(PSTR("

"), (WIFI_TEST_FINISHED_BAD == Web.wifiTest) ? "none" : Web.initial_config ? "block" : "none", Web.initial_config ? "block" : "none" ); WSContentSpaceButton(BUTTON_RESTORE, !Web.initial_config);