2023-05-01 19:23:31 +02:00
|
|
|
|
|
|
|
String getConfigHTML()
|
|
|
|
{
|
|
|
|
String config_html = ""
|
|
|
|
"<form class=\"pure-form pure-form-aligned\" action=\"/\" method=\"post\">"
|
|
|
|
"<h3>Config</h3>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"startup\">"
|
|
|
|
"<strong>Startup</strong>"
|
|
|
|
"</label>"
|
|
|
|
"<select onchange=\"this.form.submit()\" id=\"startup\" name=\"startup\">"
|
|
|
|
"<option {{STARTUP_SELECTED_LS_0}} value=\"0\">Last state</option>"
|
|
|
|
"<option {{STARTUP_SELECTED_ON_1}} value=\"1\">On</option>"
|
|
|
|
"<option {{STARTUP_SELECTED_OFF_2}} value=\"2\">Off</option>"
|
|
|
|
"</select>"
|
|
|
|
"</div>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"scene\">"
|
|
|
|
"<strong>Scene</strong>"
|
|
|
|
"</label>"
|
|
|
|
"<select onchange=\"this.form.submit()\" id=\"scene\" name=\"scene\">"
|
|
|
|
"<option {{SCENE_SELECTED_RELAX_0}} value=\"0\">Relax</option>"
|
|
|
|
"<option {{SCENE_SELECTED_BRIGHT_1}} value=\"1\">Bright</option>"
|
|
|
|
"<option {{SCENE_SELECTED_NIGHT_2}} value=\"2\">Night</option>"
|
|
|
|
"</select>"
|
|
|
|
"</div>"
|
|
|
|
"<br>"
|
|
|
|
"<h3>Wifi</h3>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"ip\">SSID</label>"
|
|
|
|
"<input id=\"ssid\" name=\"ssid\" type=\"text\" value=\"{{WIFI_SSID}}\">"
|
|
|
|
"</div>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"wpw\">Passphrase</label>"
|
|
|
|
"<input id=\"wpw\" name=\"wpw\" type=\"text\" placeholder=\"1234password\">"
|
|
|
|
"</div>"
|
|
|
|
"<br>"
|
|
|
|
"<h3>Network</h3>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"dip\">"
|
|
|
|
"<strong>Dynamic-IP</strong>"
|
|
|
|
"</label>"
|
|
|
|
"<a class=\"pure-button {{DIP_LINK_ON_PRIMARY}}\" href=\"/?dip=true\">ON</a>"
|
|
|
|
"<a class=\"pure-button {{DIP_LINK_OFF_PRIMARY}}\" href=\"/?dip=false\">OFF</a>"
|
|
|
|
"</div>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"ip\">IP</label>"
|
2023-05-02 08:03:14 +02:00
|
|
|
"<input id=\"ip\" name=\"ip\" type=\"text\" value=\"{{WIFI_CFG_IP}}\">"
|
2023-05-01 19:23:31 +02:00
|
|
|
"</div>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"gwip\">Gateway IP</label>"
|
2023-05-02 08:03:14 +02:00
|
|
|
"<input id=\"gwip\" name=\"gwip\" type=\"text\" value=\"{{WIFI_CFG_GW}}\">"
|
2023-05-01 19:23:31 +02:00
|
|
|
"</div>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"ip\">Netmask</label>"
|
2023-05-02 08:03:14 +02:00
|
|
|
"<input id=\"netmask\" name=\"netmas\" type=\"text\" value=\"{{WIFI_CFG_NM}}\">"
|
2023-05-01 19:23:31 +02:00
|
|
|
"</div>"
|
|
|
|
"<div class=\"pure-control-group\">"
|
|
|
|
"<label for=\"ip\">DNS</label>"
|
2023-05-02 08:03:14 +02:00
|
|
|
"<input id=\"netmask\" name=\"dns\" type=\"text\" value=\"{{WIFI_CFG_DNS}}\">"
|
2023-05-01 19:23:31 +02:00
|
|
|
"</div>"
|
|
|
|
"<div class=\"pure-controls\">"
|
|
|
|
"<button type=\"submit\" class=\"pure-button pure-button-primary\">Save</button>"
|
|
|
|
"</div>"
|
|
|
|
"</form>";
|
|
|
|
return config_html;
|
|
|
|
}
|