new.tmpl 2.7 KB

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