Fix regressions from GUI HTML5 change (#23847)

This commit is contained in:
Theo Arends 2025-09-07 22:56:57 +02:00
parent febda983b0
commit 21eb227956
9 changed files with 24 additions and 24 deletions

View File

@ -79,10 +79,10 @@ class Matter_UI
# Displays the Configure Matter button on the configuration page
def web_add_config_button()
import webserver
# webserver.content_send("<p><form id=ac action='matterc' style='display: block;' method='get'><button>Configure Matter</button></form></p>")
webserver.content_send("<p><form id=ac action='matterc' style='display: block;' method='get'><button>")
# webserver.content_send("<p></p><form id=ac action='matterc' style='display: block;' method='get'><button>Configure Matter</button></form>")
webserver.content_send("<p></p><form id=ac action='matterc' style='display: block;' method='get'><button>")
webserver.content_send(matter._LOGO)
webserver.content_send(" Matter</button></form></p>")
webserver.content_send(" Matter</button></form>")
end
#- ---------------------------------------------------------------------- -#

View File

@ -124,7 +124,7 @@ autoconf_module.init = def (m)
# Displays a "Autoconf" button on the configuration page
def web_add_config_button()
import webserver
webserver.content_send("<p><form id=ac action='ac' style='display: block;' method='get'><button>Auto-Conf</button></form></p>")
webserver.content_send("<p></p><form id=ac action='ac' style='display: block;' method='get'><button>Auto-Conf</button></form>")
end
@ -147,17 +147,17 @@ autoconf_module.init = def (m)
if cur_module
# add button to reapply template
webserver.content_send("<p><form id=reapply style='display: block;' action='/ac' method='post' ")
webserver.content_send("<p></p><form id=reapply style='display: block;' action='/ac' method='post' ")
webserver.content_send("onsubmit='return confirm(\"This will cause a restart.\");'>")
webserver.content_send("<button name='reapply' class='button bgrn'>Re-apply current configuration</button>")
webserver.content_send("</form></p>")
webserver.content_send("</form>")
end
webserver.content_send("<p></p></fieldset><p></p>")
webserver.content_send("<fieldset><style>.bdis{background:#888;}.bdis:hover{background:#888;}</style>")
webserver.content_send(format("<legend><b title='New autoconf'>&nbsp;Select new auto-configuration</b></legend>"))
webserver.content_send("<p><form id=zip style='display: block;' action='/ac' method='post' ")
webserver.content_send("<p></p><form id=zip style='display: block;' action='/ac' method='post' ")
webserver.content_send("onsubmit='return confirm(\"This will change the current configuration and cause a restart.\");'>")
webserver.content_send("<label>Choose a device configuration:</label><br>")
webserver.content_send("<select name='zip'>")
@ -172,7 +172,7 @@ autoconf_module.init = def (m)
webserver.content_send("<button name='zipapply' class='button bgrn'>Apply configuration</button>")
# webserver.content_send(format("<input name='ota' type='hidden' value='%d'>", ota_num))
webserver.content_send("</form></p>")
webserver.content_send("</form>")
webserver.content_send("<p></p></fieldset><p></p>")

View File

@ -21,7 +21,7 @@ class Leds_animation_UI
def web_add_button()
import webserver
webserver.content_send(
"<form id=but_part_mgr style='display: block;' action='leds_anim' method='get'><button>Leds animation</button></form><p></p>")
"<p></p><form id=but_part_mgr style='display: block;' action='leds_anim' method='get'><button>Leds animation</button></form>")
end
#######################################################################

View File

@ -26,7 +26,7 @@ class ArtNet_UI
# Displays a "DMX ArtNet" button on the configuration page
def web_add_config_button()
import webserver
webserver.content_send("<p><form id=artnet_ui action='artnet_ui' style='display: block;' method='get'><button>Configure ArtNet animations</button></form></p>")
webserver.content_send("<p></p><form id=artnet_ui action='artnet_ui' style='display: block;' method='get'><button>Configure ArtNet animations</button></form>")
end
# ####################################################################################################
@ -101,7 +101,7 @@ class ArtNet_UI
webserver.content_send("<fieldset><style>.bdis{background:#888;}.bdis:hover{background:#888;}</style>")
webserver.content_send(format("<legend><b title='ArtNet'>&nbsp;ArtNet configuration</b></legend>"))
webserver.content_send("<p><form id=artnet_ui style='display: block;' action='/artnet_ui' method='post'>")
webserver.content_send("<p></p><form id=artnet_ui style='display: block;' action='/artnet_ui' method='post'>")
# WS2812 bus configuration
webserver.content_send(format("<p>WS2812 configuration: </p>"))
@ -168,7 +168,7 @@ class ArtNet_UI
# button
webserver.content_send("<button name='artnetapply' class='button bgrn'>Apply and Run</button>")
webserver.content_send("</form></p>")
webserver.content_send("</form>")
webserver.content_send("<p></p></fieldset><p></p>")
webserver.content_button(webserver.BUTTON_CONFIGURATION)

View File

@ -410,7 +410,7 @@ class webPageLoRaWAN : Driver
end
def web_add_config_button()
webserver.content_send("<p><form id=ac action='lrw' style='display: block;' method='get'><button>LoRaWAN</button></form></p>")
webserver.content_send("<p></p><form id=ac action='lrw' style='display: block;' method='get'><button>LoRaWAN</button></form>")
end
def _get_max_nodes()

View File

@ -74,7 +74,7 @@ class Partition_wizard_UI
def web_add_button()
import webserver
webserver.content_send(
"<form id=but_part_mgr style='display: block;' action='part_wiz' method='get'><button>Partition Wizard</button></form><p></p>")
"<p></p><form id=but_part_mgr style='display: block;' action='part_wiz' method='get'><button>Partition Wizard</button></form>")
end
# ----------------------------------------------------------------------

View File

@ -508,7 +508,7 @@ class Partition_manager_UI
def web_add_button()
import webserver
webserver.content_send(
"<form id=but_part_mgr style='display: block;' action='part_mgr' method='get'><button>Partition Manager</button></form><p></p>")
"<p></p><form id=but_part_mgr style='display: block;' action='part_mgr' method='get'><button>Partition Manager</button></form>")
end
#- ---------------------------------------------------------------------- -#
@ -533,20 +533,20 @@ class Partition_manager_UI
end
if maxota != nil && maxota > 0
if !active && used > 0
webserver.content_send("<p><form id=setactive style='display: block;' action='/part_mgr' method='post' ")
webserver.content_send("<p></p><form id=setactive style='display: block;' action='/part_mgr' method='post' ")
webserver.content_send("onsubmit='return confirm(\"This will change the active partition and cause a restart.\");'>")
webserver.content_send("<button name='setactive' class='button bgrn'>Switch To This Partition</button>")
webserver.content_send(format("<input name='ota' type='hidden' value='%d'>", ota_num))
webserver.content_send("</form></p>")
webserver.content_send("</form>")
else
# put a fake disabled button
webserver.content_send("<p><form style='display: block;'>")
webserver.content_send("<p></p><form style='display: block;'>")
if used >= 0
webserver.content_send("<button name='setactive' class='button bdis' disabled title=\"No need to click, it's already the active partition\">Current Active Partition</button>")
else
webserver.content_send("<button name='setactive' class='button bdis' disabled>Empty Partition</button>")
end
webserver.content_send("</form></p>")
webserver.content_send("</form>")
end
end

View File

@ -437,7 +437,7 @@ const char HTTP_COUNTER[] PROGMEM =
"<br><div id='t' style='text-align:center;'></div>";
const char HTTP_END[] PROGMEM =
"<div style='text-align:right;font-size:11px;'><hr><a href='https://github.com/arendst/Tasmota' target='_blank' style='color:#aaa;'>Tasmota %s %s " D_BY " Theo Arends</a></div>"
"<p></p><div style='text-align:right;font-size:11px;'><hr><a href='https://github.com/arendst/Tasmota' target='_blank' style='color:#aaa;'>Tasmota %s %s " D_BY " Theo Arends</a></div>"
"</div>"
"</body>"
"</html>";
@ -1121,7 +1121,7 @@ void WSContentButton(uint32_t title_index, bool show=true) {
/*-------------------------------------------------------------------------------------------*/
void WSContentSpaceButton(uint32_t title_index, bool show=true) {
WSContentSend_P(PSTR("<div></div>")); // 5px padding
WSContentSend_P(PSTR("<div><p></p></div>")); // 5px padding
WSContentButton(title_index, show);
}
@ -1451,7 +1451,7 @@ void HandleRoot(void) {
WSContentSend_P(HTTP_SCRIPT_ROOT_PART2);
WSContentSendStyle();
WSContentSend_P(PSTR("<div style='padding:0;' id='l1' name='l1'></div><div></div>"));
WSContentSend_P(PSTR("<div style='padding:0;' id='l1' name='l1'></div><div><p></p></div>"));
#ifndef FIRMWARE_MINIMAL
@ -3796,7 +3796,7 @@ void HandleManagement(void) {
XdrvMailbox.index = 0;
XdrvXsnsCall(FUNC_WEB_ADD_CONSOLE_BUTTON);
// WSContentSend_P(PSTR("<div></div>")); // 5px padding
// WSContentSend_P(PSTR("<div><p></p></div>")); // 5px padding
XdrvCall(FUNC_WEB_ADD_MANAGEMENT_BUTTON);
WSContentSpaceButton(BUTTON_MAIN);

View File

@ -821,7 +821,7 @@ void HandleBerryBECLoaderButton(void) {
const BeBECCode_t &bec = BECCode[i];
if (!(*bec.loaded)) {
if (be_global_find(vm, be_newstr(vm, bec.id)) < 0) { // the global name doesn't exist
WSContentSend_P("<form id=but_part_mgr style='display:block;' action='tapp' method='get'><input type='hidden' name='n' value='%s'/><button>[Load %s]</button></form><p></p>", bec.id, bec.display_name);
WSContentSend_P("<p></p><form id=but_part_mgr style='display:block;' action='tapp' method='get'><input type='hidden' name='n' value='%s'/><button>[Load %s]</button></form>", bec.id, bec.display_name);
} else {
*bec.loaded = true;
}