{% extends "base.html" %}
{% block title %}- Edit User{% endblock %}
{% block body %}
<div class="span-18 tabs">
	<ul class="span-18 last">
        <li><a class="active" href="{{ url_for('user.edit') }}"><h2>Edit User</h2></a></li>
        <li><a href="{{ url_for('user.edit_password') }}">Edit Password</a></li>
    </ul>
</div>

{% if error %}
<div class="error">
    <span class="embolden">ERROR</span> {{ error }}
</div>
{% endif %}

<form action="{{ url_for('user.edit') }}" method="post" class="inline">
    <div class="span-9"><label for="name">Username</label><br><input type="text" name="name" class="title span-9" value="{{ user.name }}"></div>
    <div class="span-9 last"><label for="email">Email</label><br><input type="email" name="email" class="title span-9" value="{{ user.email }}"></div>
    <div class="span-9 append-9 last"><label for="group">Group</label><br>
        <select name="group" class="span-9">
            {% for group in groups %}
                {% if group == user.group %}
                <option selected>{{ group.name }}
                {% else %}
                <option>{{ group.name }}
                {% endif %}
                {% endfor %}
        </select>
    </div>
    <div class="span-9 append-9 last submit"><input type="submit" value="Continue &rarr;"></div>
</form>
{% endblock %}

