{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans 'Add a new email address' %}{% endblock title %}

{% block content %}

<h1>{% trans 'Add a new email address' %}</h1>

<p>{% blocktrans %}Otherwise, type your email address in the box below and we will send you an email with a link to click on in order to verify that you own that email address.{% endblocktrans %}</p>

{% if form.errors %}
    {% for error in form.non_field_errors %}
        <div class="alert alert-danger" role="alert">{{ error|escape }}</div>
    {% endfor %}
{% endif %}
{% if form.email.errors %}
<div class="alert alert-danger" role="alert">{{ form.email.errors }}</div>
{% endif %}
<div class="form-container">
<form action="{% url 'add_email' %}" name="addemail" method="post" id="form-addemail">
{% csrf_token %}

<div class="form-group">
<label for="id_email" class="form-label">{% trans 'Email' %}</label>
<input type="email" name="email" autofocus required class="form-control" id="id_email" placeholder="{% trans 'Enter your email address' %}">
</div>
<div class="button-group">
  <button type="submit" class="btn btn-primary">{% trans 'Add' %}</button>
</div>

</form>
</div>
<div style="height:40px"></div>
{% endblock content %}
