cup/storage/templates/admin_useredit.html

32 lines
1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
{{template "page_head" "Goffee"}}
<body>
<div class="container">
<h2>Edit user form</h2>
{{if .ErrorMessages }}<div class="alert alert-dismissible alert-warning">
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
<ul>
{{range $i, $a := .ErrorMessages}}
<li>{{$a}}</li>
{{end}}
</ul>
</div>{{end}}
<form method="POST" id="add_user" action="/admin/users/edit/{{.FieldKey.Value}}">
{{template "form_input" .FieldName}}
{{template "form_input" .FieldFullname}}
{{template "form_input" .FieldEmail}}
{{template "form_checkbox" .FieldRoles}}
{{template "form_input" .FieldPassword}}
{{template "form_input" .FieldKey}}
{{template "form_button" .SubmitButton}}
</form>
<hr>
<form method="POST" id="del_user" action="/admin/users/delete">
{{template "form_input" .FieldKey}}
{{template "form_button" .DeleteButton}}
</form>
</div>
{{template "page_footer"}}
</body>
</html>