From 27cee8868b42c53617edca43dabca027b0658c80 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 13 Apr 2021 12:41:13 +0200 Subject: [PATCH] Refactor new webserver boarding code --- tasmota/xdrv_01_webserver.ino | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) 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("