SFS/templates/admin_user_edit.html

41 lines
2.0 KiB
HTML

{% extends "base.html" %}
{% block title %} Administration {% endblock %}
{% block titre %} Administration : Edit user {% endblock %}
{% block contenu %}
<div id="zone-de-contenu">
<form method="POST" action="">
<div style="width:100%;margin:20px;"> </div>
<fieldset class="fieldset"><legend style="font-size:25px;">User</legend>
{% for message in get_flashed_messages() %}
<div class="alert" id="alert{{loop.index}}">
<button type="button" class="close" onclick="javascript:hidealert('alert{{loop.index}}')">&times;</button>
{{ message }}
</div>
{% endfor %}
<table width=100%>
<tr><td>Username: </td><td> <input type="text" name="username" placeholder="jean.dupont" {% if useredit is not none %} value="{{useredit.login}}" readonly="readonly"{% endif %} /></td></tr>
<tr><td>Full name: </td><td> <input type="text" name="name" placeholder="Mr Jean Dupont" {% if useredit is not none %} value="{{useredit.name}}" {% endif %} /></td></tr>
<tr><td> Password: </td><td> <input type="password" name="password" placeholder="Mot de passe"/></td></tr>
<tr><td> Permissions: </td><td> <select name="level">
{% for e in levels_users %}
{% if useredit is none %}
<option value="{{ levels_users[e] }}" {% if e == 'Simple user' %}selected{% endif %}>{{ e }}</option>
{% else %}
<option value="{{ levels_users[e] }}" {% if useredit.is_admin == levels_users[e] %}selected{% endif %}>{{ e }}</option>
{% endif %}
{% endfor %}
</select>
</td></tr>
<tr><td>&nbsp;</td> <td><input id="submit" type="submit" value="&nbsp;OK&nbsp;"></td></tr>
</table>
</fieldset>
</form>
</div>
{% endblock %}