config.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" href="max80.css" />
  5. <title>MAX80: Configuration</title>
  6. <script src="max80.js"></script>
  7. <script>
  8. function addextrainfo(event) {
  9. var form = event.currentTarget;
  10. var elem = form.elements;
  11. var hosttime = elem["hosttime"];
  12. var hostzone = elem["hostzone"];
  13. var now = new Date();
  14. hosttime.value = now.valueOf();
  15. hostzone.value = -60 * now.getTimezoneOffset();
  16. }
  17. </script>
  18. </head>
  19. <body>
  20. <script>inc("head.html")</script>
  21. <h1>Configuration</h1>
  22. <form id="config" action="sys/setconfig" enctype="text/plain"
  23. method="post" onsubmit="addextrainfo(event)">
  24. <fieldset>
  25. <legend>Network</legend>
  26. <label for="wifi.ssid">Network name (SSID):</label>
  27. <input type="text" id="wifi.ssid" name="wifi.ssid" size="64" /><br />
  28. <label for="wifi.psk">Network password (PSK):</label>
  29. <input type="password" id="wifi.psk" name="wifi.psk" size="64" />
  30. <button type="button" class="showpwd" onclick="showpwd('wifi.psk',this)">show</button>
  31. </fieldset>
  32. <fieldset>
  33. <legend>Date and Time</legend>
  34. <label for="TZ">Timezone configuration:</label>
  35. <input type="text" id="TZ" name="TZ" size="64"><br />
  36. <input type="hidden" name="-sntp" />
  37. <label for="sntp">Synchronize time from network:</label>
  38. <input type="checkbox" id="sntp" name="sntp" /><br />
  39. <label for="sntp.server">NTP server:</label>
  40. <input type="text" id="sntp.server" name="sntp.server" size="64"><br />
  41. <input type="hidden" name="-ip4.dhcp.nosntp" />
  42. <label for="ip4.dhcp.nosntp">Ignore DHCP-provided NTP server:</label>
  43. <input type="checkbox" id="ip4.dhcp.nosntp" name="ip4.dhcp.nosntp" />
  44. </fieldset>
  45. <button type="submit">Update configuration</button>
  46. </form>
  47. <script>loadform('form#config','sys/getconfig')</script>
  48. </body>
  49. </html>