feat(webui): add accounts username and isAdmin flag edition for admins
Closes #43
This commit is contained in:
parent
4f68621bad
commit
373f567773
6 changed files with 111 additions and 50 deletions
|
@ -8,7 +8,7 @@
|
|||
</p>
|
||||
</div>
|
||||
{{ if .Page.Session.Data.Account.IsAdmin }}
|
||||
<form action="/accounts" enctype="multipart/form-data" method="post">
|
||||
<form action="/accounts" method="post">
|
||||
<input name="csrf_token" type="hidden" value="{{ .Page.Session.Data.CsrfToken }}">
|
||||
<fieldset>
|
||||
<legend>New User Account</legend>
|
||||
|
@ -21,11 +21,11 @@
|
|||
type="text"
|
||||
value="{{ .Username }}">
|
||||
<label for="is-admin">Is Admin</label>
|
||||
<input {{ if .IsAdmin }} checked{{ end }}
|
||||
<input {{ if .IsAdmin }}checked{{ end }}
|
||||
id="is-admin"
|
||||
name="is-admin"
|
||||
type="checkbox"
|
||||
value="{{ .IsAdmin }}" />
|
||||
value="1" />
|
||||
</div>
|
||||
{{ if .UsernameDuplicate }}
|
||||
<span class="error">This username already exist.</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue