{% extends "wagtailadmin/base.html" %}
{% load wagtailadmin_tags i18n %}

{% block titletag %}{% trans "Change profile picture" %}{% endblock %}
{% block content %}
    {% trans "Change profile picture" as change_str %}
    {% include "wagtailadmin/shared/header.html" with title=change_str %}

    <div class="nice-padding">
        <p>{% trans "Your current profile picture:" %}</p>
        <p>
            <span class="avatar square"><img src="{% avatar_url request.user size=50 %}" alt=""></span>
        </p>

        <form action="{% url 'wagtailadmin_account_change_avatar' %}" method="POST" enctype="multipart/form-data">
            {% csrf_token %}

            <ul class="fields">
                {% for field in form %}
                    {% include "wagtailadmin/shared/field_as_li.html" with field=field %}
                {% endfor %}
                <li class="submit"><button class="button">{% trans 'Update' %}</button></li>
            </ul>

        </form>

    </div>
{% endblock %}
