Confirm suspension before submitting the form
This also includes a bit of explanation about what suspending a user actually does. Ref T661
This commit is contained in:
parent
c9f7219831
commit
280c32afdc
|
@ -57,7 +57,7 @@ td.active-suspend > input[type="submit"] {
|
|||
<td>{{if .LastPost}}{{.LastPost}}{{else}}Never{{end}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<form action="/admin/user/{{.User.Username}}/status" method="POST">
|
||||
<form action="/admin/user/{{.User.Username}}/status" method="POST" {{if not .User.IsSuspended}}onsubmit="return confirmSuspend()"{{end}}>
|
||||
<a id="status"/>
|
||||
<th>Status</th>
|
||||
<td class="active-suspend">
|
||||
|
@ -116,5 +116,11 @@ td.active-suspend > input[type="submit"] {
|
|||
{{end}}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function confirmSuspend() {
|
||||
return confirm("Suspend this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time.");
|
||||
}
|
||||
</script>
|
||||
|
||||
{{template "footer" .}}
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in New Issue