Dynastie/dynastie/templates/edit_user.html

22 lines
858 B
HTML
Raw Permalink Normal View History

{% extends "base.html" %}
2012-07-08 16:23:39 +02:00
{% block content %}
2012-07-22 10:47:24 +02:00
{% if edited %}
<p class="edited">User successfuly updated</p>
2012-07-22 10:47:24 +02:00
{% endif %}
2012-07-08 16:23:39 +02:00
{% if user.is_superuser or user.id == user_to_edit.id %}
<form action="/user/edit/{{ user_to_edit.id }}" method="post">
{% csrf_token %}
{{ form.as_p }}
<p><label for="id_password">Password:</label> <input id="id_password" type="text" name="password" maxlength="128" /></p>
<input type="submit" name="edit" value="Edit" /><input type="submit" name="cancel" value="Cancel" />{% if user.is_superuser %}<input type="submit" name="delete" value="Delete" onclick="return confirm('Do you really want to delete this item ?')"/>{% endif %}
2012-07-08 16:23:39 +02:00
</form>
{% else %}
2012-12-24 15:40:11 +01:00
<form action="/user/edit/{{ user_to_edit.id }}" method="post">
{% csrf_token %}
2012-07-08 16:23:39 +02:00
{{ form.as_p }}
2012-12-24 15:40:11 +01:00
<input type="submit" name="cancel" value="Cancel" />
</form>
2012-07-08 16:23:39 +02:00
{% endif %}
{% endblock %}