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.

62 lines
2.6 KiB

  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. <!-- Send register notify e-mail -->
  45. {{if .CanSendEmail}}
  46. <div class="inline field">
  47. <div class="ui checkbox">
  48. <label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
  49. <input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
  50. </div>
  51. </div>
  52. {{end}}
  53. <div class="field">
  54. <button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
  55. </div>
  56. </form>
  57. </div>
  58. </div>
  59. </div>
  60. {{template "base/footer" .}}