register.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!DOCTYPE html>
  2. <html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" layout:decorate="~{layout/layout}">
  3. <head>
  4. <title>Register</title>
  5. </head>
  6. <body>
  7. <div layout:fragment="content">
  8. <div class="ui container">
  9. <br />
  10. <h1>Register New Account</h1>
  11. <p>
  12. You will require an account if you wish to submit your software to the store.
  13. </p>
  14. </div>
  15. <div class="ui divider"></div>
  16. <div class="ui container">
  17. <div th:unless="${user}">
  18. <form class="ui form" method="post" action="/user/register/" id="registerForm">
  19. <div class="required field">
  20. <label>Username</label>
  21. <input type="text" name="username" placeholder="Username" />
  22. </div>
  23. <div class="required field">
  24. <label>Email</label>
  25. <input type="email" name="email" placeholder="Email Address" />
  26. </div>
  27. <div class="required field">
  28. <label>Password</label>
  29. <input type="password" name="password" placeholder="Password" />
  30. </div>
  31. <p>Please read our <a href="/legal/terms/">terms and conditions</a>.</p>
  32. <div class="required field">
  33. <div class="ui checkbox">
  34. <input type="checkbox" name="terms" />
  35. <label>I agree to the Terms and Conditions</label>
  36. </div>
  37. </div>
  38. <button type="submit" class="ui green submit button">Register A New Account</button>
  39. <div class="ui error message"></div>
  40. <div class="ui red message visible" th:if="${error}">
  41. <ul>
  42. <li th:each="err : ${error}">
  43. <span th:text="${err}"></span>
  44. </li>
  45. </ul>
  46. </div>
  47. </form>
  48. <!--
  49. <script type="text/javascript">
  50. $(".ui.form").form({
  51. fields: {
  52. username: {
  53. identifier: "username",
  54. rules: [
  55. {
  56. type: "minLength[3]",
  57. prompt: "Your username must be at least {ruleValue} characters long."
  58. }
  59. ]
  60. },
  61. email: {
  62. identifier: "email",
  63. rules: [
  64. {
  65. type: "email",
  66. prompt: "Please specify a valid email address."
  67. }
  68. ]
  69. },
  70. password: {
  71. identifier: "password",
  72. rules: [
  73. {
  74. type: "minLength[6]",
  75. prompt: "Your password must be at least {ruleValue} characters long."
  76. }
  77. ]
  78. },
  79. terms: {
  80. identifier: "terms",
  81. rules: [
  82. {
  83. type: "checked",
  84. prompt: "You must agree to the terms and conditions"
  85. }
  86. ]
  87. }
  88. }
  89. });
  90. </script>-->
  91. </div>
  92. <div th:if="${user}">
  93. <div th:text=" 'You are already logged in as ' + ${user.name}">Hi, User</div>
  94. </div>
  95. </div>
  96. </div>
  97. </body>
  98. </html>