1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-11 21:10:26 +00:00
mycorrhiza/admin/view_new_user.html
la-ninpre fd6889cea3 add 'reader' group
it is essentially the same as 'anon' but 'reader' is allowed to log in
if wiki is locked down.
2022-09-18 14:01:28 +03:00

45 lines
1.7 KiB
HTML

{{define "title"}}{{block "create user" .}}Create a new user{{end}}{{end}}
{{define "body"}}
<main class="main-width form-wrap">
<h1>{{block "new user" .}}New user{{end}}</h1>
{{if .Form.HasError}}
<div class="notice notice--error">
<strong>{{template "error"}}:</strong>
{{.Form.Error}}
</div>
{{end}}
<form class="form--double" action="" method="post">
<div class="form-field">
<label for="name">{{block "name" .}}Name{{end}}:</label>
<input type="text" name="name" id="name" value="{{.Form.Get `name`}}" autofocus>
</div>
<div class="form-field">
<label for="password">{{block "password" .}}Password{{end}}:</label>
<input type="password" name="password" id="password" value="{{.Form.Get `password`}}">
</div>
<div class="form-field">
<label for="group">{{block "group" .}}Group{{end}}:</label>
<select id="group" name="group">
<option {{if .Form.Get "group" | eq "anon" }}selected{{end}}>anon</option>
<option {{if .Form.Get "group" | eq "reader" }}selected{{end}}>reader</option>
<option {{if .Form.Get "group" | eq "editor" }}selected{{end}}>editor</option>
<option {{if .Form.Get "group" | eq "trusted" }}selected{{end}}>trusted</option>
<option {{if .Form.Get "group" | eq "moderator" }}selected{{end}}>moderator</option>
<option {{if .Form.Get "group" | eq "admin" }}selected{{end}}>admin</option>
</select>
</div>
<div class="form-field">
<div class="form-field__input">
<button class="btn" type="submit">{{block "create" .}}Create{{end}}</button>
<a class="btn btn_weak" href="/admin/users/">{{template "cancel"}}</a>
</div>
</div>
</form>
</main>
{{end}}