本站源代码
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

70 lines
2.8KB

  1. {{template "base/head" .}}
  2. <div class="admin new user">
  3. {{template "admin/navbar" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h4 class="ui top attached header">
  7. {{.i18n.Tr "admin.users.new_account"}}
  8. </h4>
  9. <div class="ui attached segment">
  10. <form class="ui form" action="{{.Link}}" method="post">
  11. {{.CsrfTokenHtml}}
  12. <!-- Types and name -->
  13. <div class="inline required field {{if .Err_LoginType}}error{{end}}">
  14. <label>{{.i18n.Tr "admin.users.auth_source"}}</label>
  15. <div class="ui selection type dropdown">
  16. <input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
  17. <div class="text">{{.i18n.Tr "admin.users.local"}}</div>
  18. <i class="dropdown icon"></i>
  19. <div class="menu">
  20. <div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
  21. {{range .Sources}}
  22. <div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
  23. {{end}}
  24. </div>
  25. </div>
  26. </div>
  27. <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
  28. <label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
  29. <input id="login_name" name="login_name" value="{{.login_name}}">
  30. </div>
  31. <div class="required field {{if .Err_UserName}}error{{end}}">
  32. <label for="user_name">{{.i18n.Tr "username"}}</label>
  33. <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
  34. </div>
  35. <div class="required field {{if .Err_Email}}error{{end}}">
  36. <label for="email">{{.i18n.Tr "email"}}</label>
  37. <input id="email" name="email" type="email" value="{{.email}}" required>
  38. </div>
  39. <input class="fake" type="password">
  40. <div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
  41. <label for="password">{{.i18n.Tr "password"}}</label>
  42. <input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
  43. </div>
  44. <div class="inline field">
  45. <div class="ui checkbox">
  46. <label><strong>{{.i18n.Tr "auth.allow_password_change" }}</strong></label>
  47. <input name="must_change_password" type="checkbox" checked>
  48. </div>
  49. </div>
  50. <!-- Send register notify e-mail -->
  51. {{if .CanSendEmail}}
  52. <div class="inline field">
  53. <div class="ui checkbox">
  54. <label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
  55. <input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
  56. </div>
  57. </div>
  58. {{end}}
  59. <div class="field">
  60. <button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
  61. </div>
  62. </form>
  63. </div>
  64. </div>
  65. </div>
  66. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1