{% extends "account/base.html" %}
{% load django_bootstrap5 %}

{% load i18n %}
{% load account %}

{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}

{% block accounts_content %}
  <div class="header_custom">
    <div class="branding_custom">
      <h1 class="site-name_custom"><a>{% trans "Confirm E-mail Address" %}</a></h1>
    </div>
  </div>
  <div class="main_form">
    {% if confirmation %}
      {% user_display confirmation.email_address.user as user_display %}
      <p>{% blocktrans with confirmation.email_address.email as email %}Please confirm that
        <a href="mailto:{{ email }}">{{ email }}</a> is an e-mail address for user {{ user_display }}
        .{% endblocktrans %}</p>

      <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
        {% csrf_token %}
        {% trans 'Confirm' as button_text %}
        {% bootstrap_button button_text button_type="submit" extra_classes="secondaryAction w-100" %}
      </form>
    {% else %}
      {% url 'account_email' as email_url %}

      <p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please
        <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
    {% endif %}
  </div>
{% endblock %}
