adds section hrs

This commit is contained in:
Shawn A
2018-03-16 10:56:28 -05:00
parent 424f48f0a8
commit f60a1d1b06
2 changed files with 8 additions and 3 deletions
+5 -1
View File
@@ -763,8 +763,9 @@ void WiFiManager::handleWifi(boolean scan) {
page += pitem;
page += getStaticOut();
page += FPSTR(HTTP_FORM_WIFI_END);
if(_paramsInWifi && _paramsCount>0){
page += FPSTR(HTTP_FORM_WIFI_END);
page += FPSTR(HTTP_FORM_PARAM_HEAD);
page += getParamOut();
}
page += FPSTR(HTTP_FORM_END);
@@ -964,6 +965,9 @@ String WiFiManager::getStaticOut(){
if((_staShowDns || _sta_static_dns) && _staShowDns>=0){
page += getIpForm(FPSTR(S_dns),FPSTR(S_staticdns),(_sta_static_dns ? _sta_static_dns.toString() : "")); // @token dns
}
if(page!="") page += FPSTR(HTTP_BR); // @todo remove these, use css
return page;
}
+3 -2
View File
@@ -43,10 +43,11 @@ const char HTTP_ITEM[] PROGMEM = "<div><a href='#p' onclick='c(this)
const char HTTP_FORM_START[] PROGMEM = "<form method='POST' action='{v}'>";
const char HTTP_FORM_WIFI[] PROGMEM = "<label for='s'>SSID</label><input id='s' name='s' maxlength='32' autocorrect='off' autocapitalize='none' placeholder='{v}'><br/><label for='p'>Password</label><input id='p' name='p' maxlength='64' type='password' placeholder=''>";
const char HTTP_FORM_WIFI_END[] PROGMEM = "<hr><br/>";
const char HTTP_FORM_STATIC_HEAD[] PROGMEM = "<hr><br/>";
const char HTTP_FORM_WIFI_END[] PROGMEM = "";
const char HTTP_FORM_STATIC_HEAD[] PROGMEM = "<hr><br/>";
const char HTTP_FORM_END[] PROGMEM = "<br/><br/><button type='submit'>Save</button></form>";
const char HTTP_FORM_LABEL[] PROGMEM = "<label for='{i}'>{t}</label>";
const char HTTP_FORM_PARAM_HEAD[] PROGMEM = "<hr><br/>";
const char HTTP_FORM_PARAM[] PROGMEM = "<br/><input id='{i}' name='{n}' maxlength='{l}' placeholder='' value='{v}' {c}>";
const char HTTP_SCAN_LINK[] PROGMEM = "<br/><form action='/wifi?refresh=1' method='post'><button>Refresh</button></form>";