2018-09-22 03:53:29 +02:00
{{ define "title"}}{{ t "page.new_user.title" }}{{ end }}
2017-11-20 06:10:04 +01:00
2024-01-27 09:25:55 +01:00
{{ define "page_header"}}
< section class = "page-header" aria-labelledby = "page-header-title" >
2024-01-25 07:22:18 +01:00
< h1 id = "page-header-title" > {{ t "page.new_user.title" }}< / h1 >
2019-11-18 02:26:47 +01:00
{{ template "settings_menu" dict "user" .user }}
2024-01-27 09:25:55 +01:00
< / section >
2024-01-25 07:22:18 +01:00
{{ end }}
2017-11-20 06:10:04 +01:00
2024-01-25 07:22:18 +01:00
{{ define "content"}}
2017-11-20 06:10:04 +01:00
< form action = "{{ route " saveUser " } } " method = "post" autocomplete = "off" >
< input type = "hidden" name = "csrf" value = "{{ .csrf }}" >
{{ if .errorMessage }}
2024-02-05 07:20:05 +01:00
< div role = "alert" class = "alert alert-error" > {{ .errorMessage }}< / div >
2017-11-20 06:10:04 +01:00
{{ end }}
2018-09-22 03:53:29 +02:00
< label for = "form-username" > {{ t "form.user.label.username" }}< / label >
2021-01-05 05:29:12 +01:00
< input type = "text" name = "username" id = "form-username" value = "{{ .form.Username }}" autocomplete = "username" spellcheck = "false" required autofocus >
2017-11-20 06:10:04 +01:00
2018-09-22 03:53:29 +02:00
< label for = "form-password" > {{ t "form.user.label.password" }}< / label >
2018-07-01 03:05:51 +02:00
< input type = "password" name = "password" id = "form-password" value = "{{ .form.Password }}" autocomplete = "new-password" required >
2017-11-20 06:10:04 +01:00
2018-09-22 03:53:29 +02:00
< label for = "form-confirmation" > {{ t "form.user.label.confirmation" }}< / label >
2020-12-23 19:29:51 +01:00
< input type = "password" name = "confirmation" id = "form-confirmation" value = "{{ .form.Confirmation }}" autocomplete = "new-password" required >
2017-11-20 06:10:04 +01:00
2018-09-22 03:53:29 +02:00
< label > < input type = "checkbox" name = "is_admin" value = "1" { { if . form . IsAdmin } } checked { { end } } > {{ t "form.user.label.admin" }}< / label >
2017-11-20 06:10:04 +01:00
< div class = "buttons" >
2018-09-22 03:53:29 +02:00
< button type = "submit" class = "button button-primary" data-label-loading = "{{ t " form . submit . saving " } } " > {{ t "action.save" }}< / button > {{ t "action.or" }} < a href = "{{ route " users " } } " > {{ t "action.cancel" }}< / a >
2017-11-20 06:10:04 +01:00
< / div >
< / form >
{{ end }}