| 1 |
{{ define "title"}}{{ t "page.new_user.title" }}{{ end }} |
| 2 |
|
| 3 |
{{ define "page_header"}} |
| 4 |
<section class="page-header" aria-labelledby="page-header-title"> |
| 5 |
<h1 id="page-header-title">{{ t "page.new_user.title" }}</h1> |
| 6 |
{{ template "settings_menu" dict "user" .user }} |
| 7 |
</section> |
| 8 |
{{ end }} |
| 9 |
|
| 10 |
{{ define "content"}} |
| 11 |
<form action="{{ routePath "/user/save" }}" method="post" autocomplete="off"> |
| 12 |
<input type="hidden" name="csrf" value="{{ .csrf }}"> |
| 13 |
|
| 14 |
{{ if .errorMessage }} |
| 15 |
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div> |
| 16 |
{{ end }} |
| 17 |
|
| 18 |
<label for="form-username">{{ t "form.user.label.username" }}</label> |
| 19 |
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="username" spellcheck="false" required autofocus> |
| 20 |
|
| 21 |
<label for="form-password">{{ t "form.user.label.password" }}</label> |
| 22 |
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password" required> |
| 23 |
|
| 24 |
<label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label> |
| 25 |
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password" required> |
| 26 |
|
| 27 |
<label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "form.user.label.admin" }}</label> |
| 28 |
|
| 29 |
<div class="buttons"> |
| 30 |
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ routePath "/users" }}">{{ t "action.cancel" }}</a> |
| 31 |
</div> |
| 32 |
</form> |
| 33 |
{{ end }} |