{% extends "account/email_confirm.html" %}
{% load i18n %}
{% load account %}
{% load slippers %}
{% load widget_tweaks %}
{% block content %}
    {% trans "Confirm Email Address" as heading %}
    {% #container heading=heading  %}
    {% if confirmation %}
        {% user_display confirmation.email_address.user as user_display %}
        {% if can_confirm %}
            <div>
                {% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an email address for user {{ user_display }}.{% endblocktrans %}
            </div>
            {% url 'account_confirm_email' confirmation.key as url %}
            {% trans 'Confirm' as button_text %}
            {% #form form=form url=url button_text=button_text %}
            {% csrf_token %}
            {{ redirect_field }}
            {% /form %}
        {% else %}
            <div>
                {% blocktrans %}Unable to confirm {{ email }} because it is already confirmed by a different account.{% endblocktrans %}
            </div>
        {% endif %}
    {% else %}
        {% url 'account_email' as email_url %}
        <div>
            {% blocktrans %}This email confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new email confirmation request</a>.{% endblocktrans %}
        </div>
    {% endif %}
    {% /container %}
{% endblock content %}
