create_user.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {{ define "title"}}{{ t "New User" }}{{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "New User" }}</h1>
  5. <ul>
  6. <li>
  7. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  8. </li>
  9. <li>
  10. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  11. </li>
  12. <li>
  13. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  14. </li>
  15. <li>
  16. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  17. </li>
  18. <li>
  19. <a href="{{ route "about" }}">{{ t "About" }}</a>
  20. </li>
  21. </ul>
  22. </section>
  23. <form action="{{ route "saveUser" }}" method="post" autocomplete="off">
  24. <input type="hidden" name="csrf" value="{{ .csrf }}">
  25. {{ if .errorMessage }}
  26. <div class="alert alert-error">{{ t .errorMessage }}</div>
  27. {{ end }}
  28. <label for="form-username">{{ t "Username" }}</label>
  29. <input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="new-password" required autofocus>
  30. <label for="form-password">{{ t "Password" }}</label>
  31. <input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password" required>
  32. <label for="form-confirmation">{{ t "Confirmation" }}</label>
  33. <input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" required>
  34. <label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "Administrator" }}</label>
  35. <div class="buttons">
  36. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Save" }}</button> {{ t "or" }} <a href="{{ route "users" }}">{{ t "cancel" }}</a>
  37. </div>
  38. </form>
  39. {{ end }}