| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 | <!DOCTYPE html><html>  <head>    <link rel="stylesheet" href="max80.css" />    <title>MAX80: Configuration</title>  <script src="max80.js"></script>  </head>  <body>    <script>inc("head.html")</script>    <h1 class="config">Configuration</h1>    <form id="setconfig" action="sys/setconfig" enctype="text/plain" method="post">      <fieldset class="network">	<legend>Network</legend>	<div>	  <label for="wifi.ssid">Network name (SSID):</label>	  <input type="text" id="wifi.ssid" name="wifi.ssid" />	</div>	<div>	  <label for="wifi.psk">Network password (PSK):</label>	  <input class="mono" type="password" id="wifi.psk" name="wifi.psk" size="50" />	  <button type="button" class="show" onclick="showpwd('wifi.psk',this)"><span class="show">show</span><span class="hide">hide</span></button>	</div>      </fieldset>      <fieldset class="datetime">	<legend>Date and Time</legend>	<div>	  <label for="tz">Timezone configuration:</label>	  <select id="tzname" name="tzname" onchange="tzn(event,'tz')">	  </select>	  <input type="text" id="tz" name="TZ" oninput="tzt(event,'tzname')" />	</div>	<div>	  <label for="sntp.enabled">Synchronize time from network:</label>	  <input type="checkbox" id="sntp.enabled" name="sntp.enabled" />	</div>	<div>	  <label for="sntp.server">NTP server:</label>	  <input type="text" id="sntp.server" name="sntp.server" />	</div>	<div>	  <label for="ip4.dhcp.nosntp">Ignore DHCP-provided NTP server:</label>	  <input type="checkbox" id="ip4.dhcp.nosntp" name="ip4.dhcp.nosntp" />	</div>      </fieldset>      <button class="submit" type="submit" disabled>Update configuration</button>    </form>    <script>      fetchconfig('tz.txt').then(map => {	  var elem = getelem('tzname');	  var grp = elem;	  map.set('',''); map.set('UTC','UTC0');	  var zones = Array.from(map.keys());	  zones = zones.filter(v => v && v != 'UTC').sort();	  zones.unshift('','UTC');	  for (const z of zones) {	      const zz = z.match(/^(?:(\S+?)\/)?(\S*)$/,z);	      if (!zz) { continue; }	      if (zz[1] && zz[1] != grp.label) {		  grp = document.createElement('OPTGROUP');		  grp.label = zz[1];		  grp.classList.add('tz.'+zz[1]);		  elem.append(grp);	      } else if (!zz[1]) {		  grp = elem;	      }	      var opt = document.createElement('OPTION');	      opt.value = z;	      opt.classList.add('tz.'+z.replaceAll('/','.'));	      opt.classList.add('tz.'+zz[2].replaceAll('/','.'));	      opt.label = zz[2].replaceAll('_',' ').replaceAll('/',': ');	      opt.dataset.tz = map.get(z);	      grp.append(opt);	  }      });      function tzn(e,p) {	  var tz = e.target.selectedOptions[0].dataset.tz;	  if (tz) { getelem(p).value = tz; }      }      function tzt(e,p) { getelem(p).value = ''; }    </script>    <script>loadform('setconfig','sys/getconfig')</script>    <script>translate()</script>  </body></html>
 |