Slightly nicer admin panel in user_profile
This commit is contained in:
parent
280ccb3bcd
commit
a9918cc2fb
|
@ -93,7 +93,7 @@
|
|||
</div>
|
||||
{{ if .User }}
|
||||
{{ if .User.IsStaff }}
|
||||
<div class="mt3 mt0-ns mt3-l ml3-ns ml0-l flex flex-column items-start bg3 pa2 br2 admin">
|
||||
<div class="hmn-form mt3 mt0-ns mt3-l ml3-ns ml0-l flex flex-column g2 items-start bg1 pa2 admin">
|
||||
<div class="flex flex-row w-100 items-center">
|
||||
<b class="flex-grow-1">Admin actions</b>
|
||||
<div class="led yellow" style="height: 12px; margin: 3px;"></div>
|
||||
|
@ -101,35 +101,34 @@
|
|||
</div>
|
||||
<div class="relative w-100">
|
||||
<div class="bg3 cover absolute w-100 h-100 br2"></div>
|
||||
<form id="admin_set_options_form" method="POST" action="{{ .AdminSetOptionsUrl }}">
|
||||
<form id="admin_set_options_form" class="flex flex-column g3" method="POST" action="{{ .AdminSetOptionsUrl }}">
|
||||
{{ csrftoken .Session }}
|
||||
<input type="hidden" name="user_id" value="{{ .ProfileUser.ID }}" />
|
||||
<input type="hidden" name="username" value="{{ .ProfileUser.Username }}" />
|
||||
<div class="mt3">
|
||||
<div>User status:</div>
|
||||
<select name="status">
|
||||
<div class="input-group">
|
||||
<label for="user_status">User status:</label>
|
||||
<select id="user_status" name="status">
|
||||
<option value="inactive" {{ if eq .ProfileUser.Status 1 }}selected{{ end }}>Brand new</option>
|
||||
<option value="confirmed" {{ if eq .ProfileUser.Status 2 }}selected{{ end }}>Email confirmed</option>
|
||||
<option value="approved" {{ if eq .ProfileUser.Status 3 }}selected{{ end }}>Admin approved</option>
|
||||
<option value="banned" {{ if eq .ProfileUser.Status 4 }}selected{{ end }}>Banned</option>
|
||||
</select>
|
||||
|
||||
<div class="c--dim f7">Only sets status. Doesn't delete anything.</div>
|
||||
</div>
|
||||
<div class="mt3">
|
||||
<div>Education role:</div>
|
||||
<select name="edu_role">
|
||||
<div class="input-group">
|
||||
<label for="edu_role">Education role:</label>
|
||||
<select id="edu_role" name="edu_role">
|
||||
<option value="none" {{ if not .ProfileUser.IsEduTester }}selected{{ end }}>None</option>
|
||||
<option value="beta" {{ if and .ProfileUser.IsEduTester (not .ProfileUser.IsEduAuthor) }}selected{{ end }}>Beta Tester</option>
|
||||
<option value="author" {{ if .ProfileUser.IsEduAuthor }}selected{{ end }}>Author</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mt3">
|
||||
<input type="submit" value="Save" />
|
||||
<div class="input-group">
|
||||
<input class="btn-primary" type="submit" value="Save" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="mt3">
|
||||
<div>Danger zone:</div>
|
||||
<div class="mt4 input-group">
|
||||
<label for="admin_nuke_form">Danger zone:</label>
|
||||
<form id="admin_nuke_form" method="POST" action="{{ .AdminNukeUrl }}">
|
||||
{{ csrftoken .Session }}
|
||||
<input type="hidden" name="user_id" value="{{ .ProfileUser.ID }}" />
|
||||
|
|
Loading…
Reference in New Issue