simple addition to allow clear text passwords for WiFi (#1245)

This commit is contained in:
MaxineMuster
2024-06-11 11:06:55 +02:00
committed by GitHub
parent 9c58f9dbdb
commit aae07cf27b

View File

@ -1243,10 +1243,10 @@ int http_fn_cfg_wifi(http_request_t* request) {
</form>");
poststr_h2(request, "Use this to connect to your WiFi");
add_label_text_field(request, "SSID", "ssid", CFG_GetWiFiSSID(), "<form action=\"/cfg_wifi_set\">");
add_label_password_field(request, "Password", "pass", CFG_GetWiFiPass(), "<br>");
add_label_password_field(request, "", "pass", CFG_GetWiFiPass(), "<br>Password <span style=\"float:right;\"><input type=\"checkbox\" onclick=\"e=getElement('pass');if(this.checked){e.value='';e.type='text'}else e.type='password'\" > enable clear text password (clears password)</span>");
poststr_h2(request, "Alternate WiFi (used when first one is not responding)");
add_label_text_field(request, "SSID2", "ssid2", CFG_GetWiFiSSID2(), "");
add_label_password_field(request, "Password2", "pass2", CFG_GetWiFiPass2(), "<br>");
add_label_password_field(request, "", "pass2", CFG_GetWiFiPass2(), "<br>Password2 <span style=\"float:right;\"><input type=\"checkbox\" onclick=\"e=getElement('pass2');if(this.checked){e.value='';e.type='text'}else e.type='password'\" > enable clear text password (clears password)</span>");
#if ALLOW_WEB_PASSWORD
int web_password_enabled = strcmp(CFG_GetWebPassword(), "") == 0 ? 0 : 1;
poststr_h2(request, "Web Authentication");