Jan Dittberner
5efc57d2c3
- add audit logging for user changes - refactor model errors into functions - implement user delete form and submit handlers
30 lines
No EOL
1.4 KiB
HTML
30 lines
No EOL
1.4 KiB
HTML
{{ define "title" }}Delete User {{ .Form.User.Name }}{{ end }}
|
|
|
|
{{ define "main" }}
|
|
{{ $form := .Form }}
|
|
{{ $user := .User }}
|
|
<div class="ui form segment">
|
|
<div class="ui negative message">
|
|
<div class="header">
|
|
Withdraw motion?
|
|
</div>
|
|
<p>Do you want to delete user <strong>{{ .Form.User.Name }}</strong>?</p>
|
|
</div>
|
|
<form action="/users/{{ .Form.User.ID }}/delete" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{ .CSRFToken }}">
|
|
<div class="ui form{{ if .Form.FieldErrors }} error{{ end }}">
|
|
<div class="required field{{ if .Form.FieldErrors.reasoning }} error{{ end }}">
|
|
<label for="reasoning">Reasoning for the deletion</label>
|
|
<textarea id="reasoning" name="reasoning" rows="2">{{ .Form.Reasoning }}</textarea>
|
|
{{ if .Form.FieldErrors.reasoning }}
|
|
<span class="ui small error text">{{ .Form.FieldErrors.reasoning }}</span>
|
|
{{ end }}
|
|
</div>
|
|
<button class="ui negative labeled icon button" type="submit">
|
|
<i class="trash icon"></i> Delete user
|
|
</button>
|
|
<a href="/motions/" class="ui button">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{{ end }} |