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

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

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

{% block bodyclass %}
  class="bg-gradient-primary"
{% endblock %}

{% block page %}
  {# no modal #}
{% endblock page %}


{% block inner %}
<div class="container">
  <div class="row justify-content-center">
    <div class="col-xl-10 col-lg-12 col-md-9">
      <div class="card o-hidden border-0 shadow-lg my-5">
        <div class="card-body p-0">
          <div class="row">
            <div class="col-lg-6 d-none d-lg-block login-background-image"></div>
              <div class="col-lg-6">
                <div class="p-5">
                  <h1>{% trans "Confirm E-mail Address" %}</h1>
                    {% 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 %}
                        <button class="btn btn-primary" type="submit">{% trans 'Confirm' %}</button>
                    </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>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock inner %}
