register.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <pstm-uri>/register</pstm-uri>
  5. <pstm-template>main</pstm-template>
  6. <script>
  7. // Surface error notifications inline instead of via alert().
  8. if (window.statum) {
  9. statum.onNotifyHandler = function (kind, message) {
  10. var area = document.getElementById('register-error');
  11. if (kind === 'error' && area) {
  12. area.hidden = false;
  13. area.textContent = message;
  14. return;
  15. }
  16. window.alert(message);
  17. };
  18. }
  19. </script>
  20. </head>
  21. <body>
  22. <section class="stack" style="max-width: 26rem;">
  23. <h2>Create an account</h2>
  24. <p id="register-error" class="alert alert-danger" hidden></p>
  25. <form stm-action="page.register" class="stack">
  26. <label class="field">
  27. <span class="label">Username</span>
  28. <input class="input" name="username" required autocomplete="username">
  29. </label>
  30. <label class="field">
  31. <span class="label">Email</span>
  32. <input class="input" type="email" name="email" required autocomplete="email">
  33. </label>
  34. <label class="field">
  35. <span class="label">First name</span>
  36. <input class="input" name="forename" required autocomplete="given-name">
  37. </label>
  38. <label class="field">
  39. <span class="label">Last name</span>
  40. <input class="input" name="surname" required autocomplete="family-name">
  41. </label>
  42. <label class="field">
  43. <span class="label">Date of birth</span>
  44. <input class="input" type="date" name="date_of_birth" required autocomplete="bday">
  45. </label>
  46. <label class="field">
  47. <span class="label">Password</span>
  48. <input class="input" type="password" name="password" required autocomplete="new-password">
  49. </label>
  50. <label class="field">
  51. <span class="label">Confirm password</span>
  52. <input class="input" type="password" name="confirm_password" required autocomplete="new-password">
  53. </label>
  54. <div><button class="btn btn-primary" type="submit">Create account</button></div>
  55. </form>
  56. <p>Already registered? <a href="/login">Log in</a>.</p>
  57. </section>
  58. </body>
  59. </html>