register.tpl 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {include file='header.tpl'}
  2. <body class="border-top-wide border-primary d-flex flex-column">
  3. <div class="page page-center">
  4. <div class="container-tight my-auto">
  5. <div class="text-center mb-4">
  6. <a href="#" class="navbar-brand navbar-brand-autodark">
  7. <img src="/images/uim-logo-round_96x96.png" height="64" alt="SSPanel-UIM Logo">
  8. </a>
  9. </div>
  10. <div class="card card-md">
  11. {if $public_setting['reg_mode'] !== 'close'}
  12. <div class="card-body">
  13. <h2 class="card-title text-center mb-4">注册账户</h2>
  14. <div class="mb-3">
  15. <input id="name" type="text" class="form-control" placeholder="昵称">
  16. </div>
  17. <div class="mb-3">
  18. <input id="email" type="email" class="form-control" placeholder="电子邮箱">
  19. </div>
  20. <div class="mb-3">
  21. <div class="input-group input-group-flat">
  22. <input id="password" type="password" class="form-control" placeholder="登录密码">
  23. </div>
  24. </div>
  25. <div class="mb-3">
  26. <div class="input-group input-group-flat">
  27. <input id="confirm_password" type="password" class="form-control" placeholder="重复登录密码">
  28. </div>
  29. </div>
  30. {if $public_setting['reg_mode'] !== 'close' }
  31. <div class="mb-3">
  32. <div class="input-group input-group-flat">
  33. <input id="invite_code" type="text" class="form-control"
  34. placeholder="注册邀请码{if $public_setting['reg_mode'] === 'open'}(可选){else}(必填){/if}"
  35. value="{$invite_code}">
  36. </div>
  37. </div>
  38. {/if}
  39. {if $public_setting['reg_email_verify']}
  40. <div class="mb-3">
  41. <div class="input-group mb-2">
  42. <input id="emailcode" type="text" class="form-control" placeholder="邮箱验证码">
  43. <button id="send-verify-email" class="btn text-blue" type="button"
  44. hx-post="/auth/send" hx-swap="none"
  45. hx-vals='js:{ email: document.getElementById("email").value }'>
  46. 获取
  47. </button>
  48. </div>
  49. </div>
  50. {/if}
  51. <div class="mb-3">
  52. <label class="form-check">
  53. <input id="tos" type="checkbox" class="form-check-input"/>
  54. <span class="form-check-label">
  55. 我已阅读并同意 <a href="/tos" tabindex="-1"> 服务条款与隐私政策 </a>
  56. </span>
  57. </label>
  58. </div>
  59. <div class="mb-3">
  60. <div class="input-group mb-3">
  61. {if $public_setting['enable_reg_captcha']}
  62. {include file='captcha_div.tpl'}
  63. {/if}
  64. </div>
  65. </div>
  66. <div class="form-footer">
  67. <button class="btn btn-primary w-100"
  68. hx-post="/auth/register" hx-swap="none" hx-vals='js:{
  69. {if $public_setting['reg_email_verify']}
  70. emailcode: document.getElementById("emailcode").value,
  71. {/if}
  72. {if $public_setting['enable_reg_captcha']}
  73. {if $public_setting['captcha_provider'] === 'turnstile'}
  74. turnstile: document.querySelector("[name=cf-turnstile-response]").value,
  75. {/if}
  76. {if $public_setting['captcha_provider'] === 'geetest'}
  77. geetest: geetest_result,
  78. {/if}
  79. {/if}
  80. name: document.getElementById("name").value,
  81. email: document.getElementById("email").value,
  82. password: document.getElementById("password").value,
  83. confirm_password: document.getElementById("confirm_password").value,
  84. invite_code: document.getElementById("invite_code").value,
  85. tos: document.getElementById("tos").checked,
  86. }'>
  87. 注册新账户
  88. </button>
  89. </div>
  90. </div>
  91. {else}
  92. <div class="card-body">
  93. <p>还没有开放注册,过两天再来看看吧</p>
  94. </div>
  95. {/if}
  96. </div>
  97. <div class="text-center text-secondary mt-3">
  98. 已有账户? <a href="/auth/login" tabindex="-1">点击登录</a>
  99. </div>
  100. </div>
  101. </div>
  102. {if $public_setting['enable_reg_captcha']}
  103. {include file='captcha_js.tpl'}
  104. {/if}
  105. {include file='footer.tpl'}