fixes #974 password placeholder

showPassword()  optional
This commit is contained in:
tablatronix
2019-11-29 18:32:10 -06:00
parent 56ad40d083
commit 72bcbd8a80
4 changed files with 28 additions and 4 deletions
+18
View File
@@ -974,6 +974,13 @@ void WiFiManager::handleWifi(boolean scan) {
pitem = FPSTR(HTTP_FORM_WIFI);
pitem.replace(FPSTR(T_v), WiFi_SSID());
if(_showPassword){
pitem.replace(FPSTR(T_p), WiFi_psk());
}
else {
pitem.replace(FPSTR(T_p),FPSTR(S_passph));
}
page += pitem;
page += getStaticOut();
@@ -2195,6 +2202,17 @@ void WiFiManager::setShowDnsFields(boolean alwaysShow){
_staShowDns = alwaysShow ? 1 : 0;
}
/**
* toggle showing password in wifi password field
* if not enabled, placeholder will be S_passph
* @since $dev
* @access public
* @param boolean alwaysShow [false]
*/
void WiFiManager::setShowPassword(boolean show){
_showPassword = show;
}
/**
* toggle captive portal
* if enabled, then devices that use captive portal checks will be redirected to root