{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "users/base.html" %}
{% set title = _('Edit Profile') %}
{% set classes = 'profile' %}

{% block content %}
  <article id="edit-profile" class="main">
    <h1>{{ title }}</h1>
    <form class="boxed" method="post" action="">
      {{ csrf() }}
      <ul>
        <li id="edit-profile-avatar">
          <label>{{ _('Avatar') }}</label>
          <img src="{{ profile_avatar(profile.user) }}">
          <ul>
            <li>
              <a href="{{ url('users.edit_avatar') }}">{{ _('Change', 'avatar') }}</a>
            </li>
            {% if profile.avatar %}
              <li>
                <a href="{{ url('users.delete_avatar') }}">{{ _('Delete', 'avatar') }}</a>
              </li>
            {% endif %}
          </ul>
        </li>
        <li>
          <label>{{ _('Password') }}</label>
          <a href="{{ url('users.pw_change') }}">{{ _('Change') }}</a>
        </li>
        <li>
          <label>{{ _('Email') }}</label>
          {{ user.email }}
          <a href="{{ url('users.change_email') }}">{{ _('Change') }}</a>
        </li>
        {{ form.as_ul()|safe }}
        <li class="submit"><button type="submit">{{ _('Update') }}</button></li>
      </ul>
    </form>
  </article>
{% endblock %}
