Skip to content

Commit e8a3881

Browse files
committed
Squeeze 0.4k from code size
1 parent d521498 commit e8a3881

13 files changed

+43
-71
lines changed

tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -307,19 +307,21 @@ const char HTTP_FORM_LOGIN[] PROGMEM =
307307
const char HTTP_FIELDSET_LEGEND[] PROGMEM =
308308
"<fieldset><legend><b>&nbsp;%s&nbsp;</b></legend>";
309309

310-
const char HTTP_FORM_TEMPLATE[] PROGMEM =
311-
"<form method='get' action='tp'>";
310+
const char HTTP_FORM_GET_ACTION[] PROGMEM =
311+
"<form method='get' action='%s'>";
312+
313+
const char HTTP_FORM_BUTTON[] PROGMEM =
314+
"<p></p><form method='get' action='%s'><button>%s</button></form>";
315+
312316
const char HTTP_FORM_TEMPLATE_FLAG[] PROGMEM =
313317
// "<label><input id='c0' name='c0' type='checkbox'><b>" D_OPTION_TEXT "</b></label><br>"
314318
"</p></fieldset>";
315319

316320
const char HTTP_FORM_MODULE[] PROGMEM =
317-
"<form method='get' action='md'>"
318321
"<p></p><b>" D_MODULE_TYPE "</b> (%s)<br><select id='g99'></select><br>"
319322
"<br><table>";
320323

321324
const char HTTP_FORM_WIFI_PART1[] PROGMEM =
322-
"<form method='get' action='wi'>"
323325
"<p><b>" D_AP1_SSID "</b>%s<br><input id='s1' placeholder=\"" D_AP1_SSID_HELP "\" value=\"%s\"></p>" // Need \" instead of ' to be able to use ' in text (#8489)
324326
"<p><label><b>" D_AP_PASSWORD "</b><input type='checkbox' onclick='sp(\"p1\")'></label><br><input id='p1' type='password' placeholder=\"" D_AP_PASSWORD_HELP "\"";
325327

@@ -333,18 +335,12 @@ const char HTTP_FORM_WIFI_PART2[] PROGMEM =
333335
#endif
334336
;
335337

336-
const char HTTP_FORM_LOG1[] PROGMEM =
337-
"<form method='get' action='lg'>";
338-
const char HTTP_FORM_LOG2[] PROGMEM =
338+
const char HTTP_FORM_LOG[] PROGMEM =
339339
"<p><b>" D_SYSLOG_HOST "</b> (" SYS_LOG_HOST ")<br><input id='lh' placeholder=\"" SYS_LOG_HOST "\" value=\"%s\"></p>"
340340
"<p><b>" D_SYSLOG_PORT "</b> (" STR(SYS_LOG_PORT) ")<br><input id='lp' placeholder='" STR(SYS_LOG_PORT) "' value='%d'></p>"
341341
"<p><b>" D_TELEMETRY_PERIOD "</b> (" STR(TELE_PERIOD) ")<br><input id='lt' placeholder='" STR(TELE_PERIOD) "' value='%d'></p>";
342342

343-
const char HTTP_FORM_OTHER1[] PROGMEM =
344-
"<form method='get' action='co'>"
345-
"<p></p>";
346-
347-
const char HTTP_FORM_OTHER2[] PROGMEM =
343+
const char HTTP_FORM_OTHER[] PROGMEM =
348344
"<p><input id='t1' placeholder=\"" D_TEMPLATE "\" value='%s'></p>" // We need ' apostrophe here as the template contains " quotation mark
349345
"<p><label><input id='t2' type='checkbox'%s><b>" D_ACTIVATE "</b></label></p>"
350346
"</fieldset>"
@@ -362,11 +358,10 @@ const char HTTP_FORM_END[] PROGMEM =
362358
"<button name='save' type='submit' class='button bgrn'>" D_SAVE "</button>"
363359
"</form></fieldset>";
364360

365-
const char HTTP_DIV_BLOCK[] PROGMEM =
361+
const char HTTP_DIV_F1_BLOCK[] PROGMEM =
366362
"<div id='f1' name='f1' style='display:block;'>";
367363

368364
const char HTTP_FORM_UPG[] PROGMEM =
369-
"<form method='get' action='u1'>"
370365
"<br><b>" D_OTA_URL "</b><br><input id='o' placeholder=\"OTA_URL\" value=\"%s\"><br>"
371366
"<br><button type='submit'>" D_START_UPGRADE "</button></form>"
372367
"</fieldset><br><br>";
@@ -2275,7 +2270,7 @@ void HandleTemplateConfiguration(void) {
22752270

22762271
WSContentSendStyle();
22772272
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_TEMPLATE_PARAMETERS));
2278-
WSContentSend_P(HTTP_FORM_TEMPLATE);
2273+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("tp"));
22792274
WSContentSend_P(HTTP_TABLE100); // "<table style='width:100%%'>"
22802275
WSContentSend_P(PSTR("<tr><td><b>" D_TEMPLATE_NAME "</b></td><td style='width:200px'><input id='s1' placeholder='" D_TEMPLATE_NAME "'></td></tr>"
22812276
"<tr><td><b>" D_BASE_TYPE "</b></td><td><select id='g99' onchange='st(this.value)'></select></td></tr>"
@@ -2449,6 +2444,7 @@ void HandleModuleConfiguration(void) {
24492444

24502445
WSContentSendStyle();
24512446
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_MODULE_PARAMETERS));
2447+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("md"));
24522448
WSContentSend_P(HTTP_FORM_MODULE, AnyModuleName(MODULE).c_str());
24532449
for (uint32_t i = 0; i < nitems(template_gp.io); i++) {
24542450
if (ValidGPIO(i, template_gp.io[i])) {
@@ -2729,6 +2725,7 @@ void HandleWifiConfiguration(void) {
27292725
WSContentSend_P(PSTR("<div><a href='/wi?scan='>%s</a></div><br>"),
27302726
(limitScannedNetworks) ? PSTR(D_SHOW_MORE_WIFI_NETWORKS) : PSTR(D_SCAN_FOR_WIFI_NETWORKS));
27312727
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_WIFI_PARAMETERS));
2728+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("wi"));
27322729
WSContentSend_P(HTTP_FORM_WIFI_PART1,
27332730
(WifiIsInManagerMode()) ? "" : PSTR(" (" STA_SSID1 ")"),
27342731
SettingsTextEscaped(SET_STASSID1).c_str());
@@ -2813,7 +2810,7 @@ void HandleLoggingConfiguration(void) {
28132810
WSContentStart_P(PSTR(D_CONFIGURE_LOGGING));
28142811
WSContentSendStyle();
28152812
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_LOGGING_PARAMETERS));
2816-
WSContentSend_P(HTTP_FORM_LOG1);
2813+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("lg"));
28172814
char stemp1[45];
28182815
char stemp2[32];
28192816
uint8_t dlevel[4] = { LOG_LEVEL_INFO, LOG_LEVEL_INFO, LOG_LEVEL_NONE, LOG_LEVEL_NONE };
@@ -2831,7 +2828,7 @@ void HandleLoggingConfiguration(void) {
28312828
}
28322829
WSContentSend_P(PSTR("</select></p>"));
28332830
}
2834-
WSContentSend_P(HTTP_FORM_LOG2,
2831+
WSContentSend_P(HTTP_FORM_LOG,
28352832
SettingsTextEscaped(SET_SYSLOG_HOST).c_str(),
28362833
Settings->syslog_port,
28372834
Settings->tele_period);
@@ -2875,9 +2872,10 @@ void HandleOtherConfiguration(void) {
28752872
TemplateJson();
28762873

28772874
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_OTHER_PARAMETERS));
2878-
WSContentSend_P(HTTP_FORM_OTHER1);
2875+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("co"));
2876+
WSContentSend_P(PSTR("<p></p>"));
28792877
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_TEMPLATE));
2880-
WSContentSend_P(HTTP_FORM_OTHER2,
2878+
WSContentSend_P(HTTP_FORM_OTHER,
28812879
HtmlEscape(ResponseData()).c_str(),
28822880
(USER_MODULE == Settings->module) ? PSTR(" checked disabled") : "",
28832881
(Settings->flag5.disable_referer_chk) ? PSTR(" checked") : "", // SetOption128 - Enable HTTP API
@@ -3018,7 +3016,7 @@ void HandleRestoreConfiguration(void) {
30183016

30193017
WSContentStart_P(PSTR(D_RESTORE_CONFIGURATION));
30203018
WSContentSendStyle();
3021-
WSContentSend_P(HTTP_DIV_BLOCK);
3019+
WSContentSend_P(HTTP_DIV_F1_BLOCK);
30223020
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_RESTORE_CONFIGURATION));
30233021
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_START_RESTORE));
30243022
if (WifiIsInManagerMode()) {
@@ -3390,8 +3388,9 @@ void HandleUpgradeFirmware(void) {
33903388
WSContentStart_P(PSTR(D_FIRMWARE_UPGRADE));
33913389
WSContentSendStyle();
33923390
WSContentSend_P(HTTP_MENU_HEAD, D_FIRMWARE_UPGRADE);
3393-
WSContentSend_P(HTTP_DIV_BLOCK);
3391+
WSContentSend_P(HTTP_DIV_F1_BLOCK);
33943392
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_UPGRADE_BY_WEBSERVER));
3393+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("u1"));
33953394
WSContentSend_P(HTTP_FORM_UPG, SettingsTextEscaped(SET_OTAURL).c_str());
33963395
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_UPGRADE_BY_FILE_UPLOAD));
33973396
#ifdef ESP32

tasmota/tasmota_xdrv_driver/xdrv_02_9_mqtt.ino

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,13 +2049,7 @@ void CmndTlsDump(void) {
20492049

20502050
#define WEB_HANDLE_MQTT "mq"
20512051

2052-
const char S_CONFIGURE_MQTT[] PROGMEM = D_CONFIGURE_MQTT;
2053-
2054-
const char HTTP_BTN_MENU_MQTT[] PROGMEM =
2055-
"<p></p><form action='" WEB_HANDLE_MQTT "' method='get'><button>" D_CONFIGURE_MQTT "</button></form>";
2056-
20572052
const char HTTP_FORM_MQTT1[] PROGMEM =
2058-
"<form method='get' action='" WEB_HANDLE_MQTT "'>"
20592053
"<p><b>" D_HOST "</b> (" MQTT_HOST ")<br><input id='mh' placeholder=\"" MQTT_HOST "\" value=\"%s\"></p>"
20602054
"<p><b>" D_PORT "</b> (" STR(MQTT_PORT) ")<br><input id='ml' placeholder='" STR(MQTT_PORT) "' value='%d'></p>"
20612055
#ifdef USE_MQTT_TLS
@@ -2085,6 +2079,7 @@ void HandleMqttConfiguration(void)
20852079
WSContentStart_P(PSTR(D_CONFIGURE_MQTT));
20862080
WSContentSendStyle();
20872081
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_MQTT_PARAMETERS));
2082+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR(WEB_HANDLE_MQTT));
20882083
WSContentSend_P(HTTP_FORM_MQTT1,
20892084
SettingsTextEscaped(SET_MQTT_HOST).c_str(),
20902085
Settings->mqtt_port,
@@ -2135,7 +2130,7 @@ bool Xdrv02(uint32_t function)
21352130
#ifdef USE_WEBSERVER
21362131
#ifndef FIRMWARE_MINIMAL // not needed in minimal/safeboot because of disabled feature and Settings are not saved anyways
21372132
case FUNC_WEB_ADD_BUTTON:
2138-
WSContentSend_P(HTTP_BTN_MENU_MQTT);
2133+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_MQTT), PSTR(D_CONFIGURE_MQTT));
21392134
break;
21402135
case FUNC_WEB_ADD_HANDLER:
21412136
WebServer_on(PSTR("/" WEB_HANDLE_MQTT), HandleMqttConfiguration);

tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,6 @@ void CmndDomoticzSend(void) {
636636

637637
#define WEB_HANDLE_DOMOTICZ "dm"
638638

639-
const char HTTP_BTN_MENU_DOMOTICZ[] PROGMEM =
640-
"<p></p><form action='" WEB_HANDLE_DOMOTICZ "' method='get'><button>" D_CONFIGURE_DOMOTICZ "</button></form>";
641-
642639
const char HTTP_FORM_DOMOTICZ[] PROGMEM =
643640
"<form method='post' action='" WEB_HANDLE_DOMOTICZ "'>"
644641
"<table>";
@@ -739,7 +736,7 @@ bool Xdrv07(uint32_t function) {
739736
break;
740737
#ifdef USE_WEBSERVER
741738
case FUNC_WEB_ADD_BUTTON:
742-
WSContentSend_P(HTTP_BTN_MENU_DOMOTICZ);
739+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_DOMOTICZ), PSTR(D_CONFIGURE_DOMOTICZ));
743740
break;
744741
case FUNC_WEB_ADD_HANDLER:
745742
WebServer_on(PSTR("/" WEB_HANDLE_DOMOTICZ), HandleDomoticzConfiguration);

tasmota/tasmota_xdrv_driver/xdrv_07_ufs_domoticz.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,6 @@ void CmndDomoticzSend(void) {
872872

873873
#define WEB_HANDLE_DOMOTICZ "dm"
874874

875-
const char HTTP_BTN_MENU_DOMOTICZ[] PROGMEM =
876-
"<p></p><form action='" WEB_HANDLE_DOMOTICZ "' method='get'><button>" D_CONFIGURE_DOMOTICZ "</button></form>";
877-
878875
const char HTTP_FORM_DOMOTICZ[] PROGMEM =
879876
"<form method='post' action='" WEB_HANDLE_DOMOTICZ "'>"
880877
"<table>"
@@ -997,7 +994,7 @@ bool Xdrv07(uint32_t function) {
997994
break;
998995
#ifdef USE_WEBSERVER
999996
case FUNC_WEB_ADD_BUTTON:
1000-
WSContentSend_P(HTTP_BTN_MENU_DOMOTICZ);
997+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_DOMOTICZ), PSTR(D_CONFIGURE_DOMOTICZ));
1001998
break;
1002999
case FUNC_WEB_ADD_HANDLER:
10031000
WebServer_on(PSTR("/" WEB_HANDLE_DOMOTICZ), HandleDomoticzConfiguration);

tasmota/tasmota_xdrv_driver/xdrv_09_timers.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,6 @@ void CmndSunrise(void) {
530530

531531
#define WEB_HANDLE_TIMER "tm"
532532

533-
const char HTTP_BTN_MENU_TIMER[] PROGMEM =
534-
"<p></p><form action='" WEB_HANDLE_TIMER "' method='get'><button>" D_CONFIGURE_TIMER "</button></form>";
535-
536533
#ifdef USE_UNISHOX_COMPRESSION
537534
const size_t HTTP_TIMER_SCRIPT1_SIZE = 106;
538535
const char HTTP_TIMER_SCRIPT1_COMPRESSED[] PROGMEM = "\x33\xBF\xA1\x94\x7C\x3D\xE3\xDF\x3A\x83\xA3\xE1\xC4\x8F\x04\x60\x5F\x07\x5B\x9C"
@@ -938,9 +935,11 @@ bool Xdrv09(uint32_t function)
938935
#ifdef USE_TIMERS_WEB
939936
case FUNC_WEB_ADD_BUTTON:
940937
#if defined(USE_RULES) || defined(USE_SCRIPT)
941-
WSContentSend_P(HTTP_BTN_MENU_TIMER);
938+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_TIMER), PSTR(D_CONFIGURE_TIMER));
942939
#else
943-
if (TasmotaGlobal.devices_present) { WSContentSend_P(HTTP_BTN_MENU_TIMER); }
940+
if (TasmotaGlobal.devices_present) {
941+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_TIMER), PSTR(D_CONFIGURE_TIMER));
942+
}
944943
#endif // USE_RULES
945944
break;
946945
case FUNC_WEB_ADD_HANDLER:

tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10044,9 +10044,6 @@ void Scripter_save_pvars(void) {
1004410044

1004510045
#define WEB_HANDLE_SCRIPT "s10"
1004610046

10047-
const char HTTP_BTN_MENU_RULES[] PROGMEM =
10048-
"<p></p><form action='" WEB_HANDLE_SCRIPT "' method='get'><button>" D_CONFIGURE_SCRIPT "</button></form>";
10049-
1005010047
const char HTTP_FORM_SCRIPT[] PROGMEM =
1005110048
"<form method='post' action='" WEB_HANDLE_SCRIPT "'>";
1005210049

@@ -14872,7 +14869,7 @@ bool Xdrv10(uint32_t function) {
1487214869
if (XdrvMailbox.index) {
1487314870
XdrvMailbox.index++;
1487414871
} else {
14875-
WSContentSend_P(HTTP_BTN_MENU_RULES);
14872+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_SCRIPT), PSTR(D_CONFIGURE_SCRIPT));
1487614873
}
1487714874
break;
1487814875
#ifdef USE_SCRIPT_WEB_DISPLAY

tasmota/tasmota_xdrv_driver/xdrv_11_knx.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,9 +1050,6 @@ void KnxSensor(uint8_t sensor_type, float value)
10501050

10511051
#ifdef USE_WEBSERVER
10521052
#ifdef USE_KNX_WEB_MENU
1053-
const char HTTP_BTN_MENU_KNX[] PROGMEM =
1054-
"<p></p><form action='kn' method='get'><button>" D_CONFIGURE_KNX "</button></form>";
1055-
10561053
const char HTTP_FORM_KNX[] PROGMEM =
10571054
"<fieldset style='min-width:530px;'>"
10581055
"<legend style='text-align:left;'><b>&nbsp;" D_KNX_PARAMETERS "&nbsp;</b></legend>"
@@ -1583,7 +1580,7 @@ bool Xdrv11(uint32_t function)
15831580
#ifdef USE_WEBSERVER
15841581
#ifdef USE_KNX_WEB_MENU
15851582
case FUNC_WEB_ADD_BUTTON:
1586-
WSContentSend_P(HTTP_BTN_MENU_KNX);
1583+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR("kn"), PSTR(D_CONFIGURE_KNX));
15871584
break;
15881585
case FUNC_WEB_ADD_HANDLER:
15891586
WebServer_on(PSTR("/kn"), HandleKNXConfiguration);

tasmota/tasmota_xdrv_driver/xdrv_28_pcf8574_v2.ino

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,7 @@ void Pcf8574ModuleInitMode1(void) {
515515
#ifdef USE_WEBSERVER
516516
#define WEB_HANDLE_PCF8574 "pcf"
517517

518-
const char HTTP_BTN_MENU_PCF8574[] PROGMEM =
519-
"<p></p><form action='" WEB_HANDLE_PCF8574 "' method='get'><button>" D_CONFIGURE_PCF8574 "</button></form>";
520-
521518
const char HTTP_FORM_I2C_PCF8574_1[] PROGMEM =
522-
"<form method='get' action='" WEB_HANDLE_PCF8574 "'>"
523519
"<p><label><input id='b1' name='b1' type='checkbox'%s><b>" D_INVERT_PORTS "</b></label></p><hr/>";
524520

525521
const char HTTP_FORM_I2C_PCF8574_2[] PROGMEM =
@@ -544,6 +540,7 @@ void HandlePcf8574(void) {
544540
WSContentStart_P(D_CONFIGURE_PCF8574);
545541
WSContentSendStyle();
546542
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_PCF8574_PARAMETERS));
543+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR(WEB_HANDLE_PCF8574));
547544
WSContentSend_P(HTTP_FORM_I2C_PCF8574_1, (Settings->flag3.pcf8574_ports_inverted) ? PSTR(" checked") : ""); // SetOption81 - Invert all ports on PCF8574 devices
548545
WSContentSend_P(HTTP_TABLE100);
549546
for (uint32_t idx = 0; idx < Pcf8574.max_devices; idx++) {
@@ -710,7 +707,7 @@ bool Xdrv28(uint32_t function) {
710707
#endif // USE_PCF8574_SENSOR
711708
#ifdef USE_WEBSERVER
712709
case FUNC_WEB_ADD_BUTTON:
713-
WSContentSend_P(HTTP_BTN_MENU_PCF8574);
710+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_PCF8574), PSTR(D_CONFIGURE_PCF8574));
714711
break;
715712
case FUNC_WEB_ADD_HANDLER:
716713
WebServer_on(PSTR("/" WEB_HANDLE_PCF8574), HandlePcf8574);

tasmota/tasmota_xdrv_driver/xdrv_43_mlx90640.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const char MLX90640type[] PROGMEM = "MLX90640";
4141

4242
#ifdef USE_WEBSERVER
4343
#define WEB_HANDLE_MLX90640 "mlx"
44-
const char HTTP_BTN_MENU_MLX90640[] PROGMEM = "<p></p><form action='" WEB_HANDLE_MLX90640 "' method='get'><button>MLX90640</button></form>";
4544
#endif // USE_WEBSERVER
4645

4746
struct {
@@ -608,7 +607,7 @@ bool Xdrv43(uint32_t function)
608607
break;
609608
#ifdef USE_WEBSERVER
610609
case FUNC_WEB_ADD_MAIN_BUTTON:
611-
WSContentSend_P(HTTP_BTN_MENU_MLX90640);
610+
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_MLX90640), PSTR("MLX90640"));
612611
break;
613612
case FUNC_WEB_ADD_HANDLER:
614613
WebServer_on(PSTR("/mlx"), MLX90640HandleWebGui);

tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ const char UFS_FORM_SDC_DIRa[] PROGMEM =
12921292
const char UFS_FORM_SDC_DIRc[] PROGMEM =
12931293
"</div>";
12941294
const char UFS_FORM_FILE_UPGb[] PROGMEM =
1295-
"<form method='get' action='ufse'><input type='hidden' name='file' value='%s/" D_NEW_FILE "'>"
1295+
"<input type='hidden' name='file' value='%s/" D_NEW_FILE "'>"
12961296
"<button type='submit'>" D_CREATE_NEW_FILE "</button></form>";
12971297
const char UFS_FORM_FILE_UPGb1[] PROGMEM =
12981298
"<label><input type='checkbox' id='shf' onclick='sf(eb(\"shf\").checked);' name='shf'>" D_SHOW_HIDDEN_FILES "</label>";
@@ -1423,7 +1423,7 @@ void UfsDirectory(void) {
14231423

14241424
WSContentStart_P(PSTR(D_MANAGE_FILE_SYSTEM));
14251425
WSContentSendStyle();
1426-
WSContentSend_P(HTTP_DIV_BLOCK);
1426+
WSContentSend_P(HTTP_DIV_F1_BLOCK);
14271427
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_MANAGE_FILE_SYSTEM));
14281428

14291429
char ts[FLOATSZ];
@@ -1452,6 +1452,7 @@ void UfsDirectory(void) {
14521452
}
14531453
WSContentSend_P(UFS_FORM_SDC_DIRc);
14541454
#ifdef GUI_EDIT_FILE
1455+
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("ufse"));
14551456
WSContentSend_P(UFS_FORM_FILE_UPGb, ufs_path);
14561457
#endif
14571458
if (!UfsIsSDC()) {

0 commit comments

Comments
 (0)