You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

signup_inner.tmpl 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <div class="user signup{{if .LinkAccountMode}} icon{{end}}">
  2. <div class="ui middle very relaxed page grid">
  3. <div class="column">
  4. <form class="ui form" action="{{.SignUpLink}}" method="post">
  5. {{.CsrfTokenHtml}}
  6. <h3 class="ui top attached header">
  7. {{if .LinkAccountMode}}
  8. {{.i18n.Tr "auth.oauth_signup_title"}}
  9. {{else}}
  10. {{.i18n.Tr "sign_up"}}
  11. {{end}}
  12. </h3>
  13. <div class="ui attached segment">
  14. {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}}
  15. {{template "base/alert" .}}
  16. {{end}}
  17. {{if .DisableRegistration}}
  18. <p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
  19. {{else}}
  20. <div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
  21. <label for="user_name">{{.i18n.Tr "username"}}</label>
  22. <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
  23. </div>
  24. <div class="required inline field {{if .Err_Email}}error{{end}}">
  25. <label for="email">{{.i18n.Tr "email"}}</label>
  26. <input id="email" name="email" type="email" value="{{.email}}" required>
  27. </div>
  28. {{if not .DisablePassword}}
  29. <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
  30. <label for="password">{{.i18n.Tr "password"}}</label>
  31. <input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
  32. </div>
  33. <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
  34. <label for="retype">{{.i18n.Tr "re_type"}}</label>
  35. <input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="off" required>
  36. </div>
  37. {{end}}
  38. {{if and .EnableCaptcha (eq .CaptchaType "image")}}
  39. <div class="inline field">
  40. <label></label>
  41. {{.Captcha.CreateHtml}}
  42. </div>
  43. <div class="required inline field {{if .Err_Captcha}}error{{end}}">
  44. <label for="captcha">{{.i18n.Tr "captcha"}}</label>
  45. <input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
  46. </div>
  47. {{end}}
  48. {{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
  49. <div class="inline field required">
  50. <div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
  51. </div>
  52. {{end}}
  53. <div class="inline field">
  54. <label></label>
  55. <button class="ui green button">
  56. {{if .LinkAccountMode}}
  57. {{.i18n.Tr "auth.oauth_signup_submit"}}
  58. {{else}}
  59. {{.i18n.Tr "auth.create_new_account"}}
  60. {{end}}
  61. </button>
  62. </div>
  63. {{if not .LinkAccountMode}}
  64. <div class="inline field">
  65. <label></label>
  66. <a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a>
  67. </div>
  68. {{end}}
  69. {{end}}
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. </div>