2018-07-07 15:11:27 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block header %}
|
|
|
|
<h1>Administration</h1>
|
|
|
|
{{ super() }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block main %}
|
|
|
|
|
|
|
|
<section id="moduser-account">
|
|
|
|
<h2>Modify {{ user.name }}</h2>
|
|
|
|
|
2018-07-09 22:38:39 +02:00
|
|
|
<form id="moduser-account-form" method="post" action="/moduser?change=update" enctype="multipart/form-data" accept-charset="UTF-8">
|
2018-07-07 15:11:27 +02:00
|
|
|
<label for="moduser-account-username">Username: </label>
|
|
|
|
<input id="moduser-account-username" type="text" name="username" value="{{ user.name }}" /><br/>
|
|
|
|
|
|
|
|
<label for="moduser-account-email">E-Mail: </label>
|
|
|
|
<input id="moduser-account-email" type="text" name="email" value="{% if user.email is not none %}{{ user.email }}{% endif %}" /><br/>
|
|
|
|
|
|
|
|
<label for="moduser-account-password">Password: </label>
|
|
|
|
<input id="moduser-account-password" type="password" name="password" /><br/>
|
|
|
|
|
2018-08-31 20:57:08 +02:00
|
|
|
<label for="moduser-account-receipt-pref">Receipts: </label>
|
|
|
|
<select id="moduser-account-receipt-pref" name="receipt_pref">
|
|
|
|
{% for pref in receipt_preference_class %}
|
|
|
|
<option value="{{ pref.value }}" {% if user.receipt_pref == pref %} selected="selected" {% endif %}>{{ pref.human_readable }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2018-09-08 21:05:03 +02:00
|
|
|
{% if config_smtp_enabled != '1' %}Sending receipts is disabled by your administrator.{% endif %}
|
2018-08-31 20:57:08 +02:00
|
|
|
<br/>
|
|
|
|
|
2018-07-07 15:11:27 +02:00
|
|
|
<label for="moduser-account-ismember">Member: </label>
|
|
|
|
<input id="moduser-account-ismember" name="ismember" type="checkbox" {% if user.is_member %} checked="checked" {% endif %}/><br/>
|
|
|
|
|
|
|
|
<label for="moduser-account-isadmin">Admin: </label>
|
|
|
|
<input id="moduser-account-isadmin" name="isadmin" type="checkbox" {% if user.is_admin %} checked="checked" {% endif %}/><br/>
|
|
|
|
|
|
|
|
<label for="moduser-account-balance">Balance: </label>
|
2018-07-20 14:58:22 +02:00
|
|
|
CHF <input id="moduser-account-balance" name="balance" type="number" step="0.01" value="{{ user.balance|chf(False) }}" /><br/>
|
2018-07-07 15:11:27 +02:00
|
|
|
|
2018-09-01 23:48:10 +02:00
|
|
|
<label for="moduser-account-balance-reason">Reason for balance modification: </label>
|
|
|
|
<input id="moduser-account-balance-reason" type="text" name="reason" placeholder="Shows up on receipt" /><br/>
|
|
|
|
|
2018-07-07 15:11:27 +02:00
|
|
|
<label for="moduser-account-avatar">
|
2020-02-03 20:44:58 +01:00
|
|
|
<img src="/static/upload/thumbnails/users/{{ user.id }}.png" alt="Avatar of {{ user.name }}" />
|
2018-07-07 15:11:27 +02:00
|
|
|
</label><br/>
|
2018-09-09 23:59:06 +02:00
|
|
|
<input id="moduser-account-avatar" type="file" name="avatar" accept="image/*" /><br/>
|
2018-07-07 15:11:27 +02:00
|
|
|
|
|
|
|
<input id="moduser-account-userid" type="hidden" name="userid" value="{{ user.id }}" /><br/>
|
|
|
|
|
|
|
|
<input type="submit" value="Save changes">
|
|
|
|
</form>
|
|
|
|
|
2018-07-09 22:38:39 +02:00
|
|
|
<form id="moduser-deluser-form" method="post" action="/moduser?change=del" accept-charset="UTF-8">
|
2018-07-07 15:11:27 +02:00
|
|
|
<input id="moduser-deluser-userid" type="hidden" name="userid" value="{{ user.id }}" /><br/>
|
|
|
|
<input type="submit" value="Delete user" />
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ super() }}
|
|
|
|
|
|
|
|
{% endblock %}
|