| 1 |
{% extends "account/base_manage_email.html" %} |
| 2 |
{% load i18n %} |
| 3 |
{% load allauth %} |
| 4 |
{% block head_title %} |
| 5 |
{% trans "Email Address" %} |
| 6 |
{% endblock head_title %} |
| 7 |
{% block content %} |
| 8 |
{% element h1 %} |
| 9 |
{% trans "Email Address" %} |
| 10 |
{% endelement %} |
| 11 |
{% if not emailaddresses %} |
| 12 |
{% include "account/snippets/warn_no_email.html" %} |
| 13 |
{% endif %} |
| 14 |
{% url 'account_email' as action_url %} |
| 15 |
{% element form method="post" action=action_url %} |
| 16 |
{% slot body %} |
| 17 |
{% csrf_token %} |
| 18 |
{% if current_emailaddress %} |
| 19 |
{% element field id="current_email" disabled=True type="email" value=current_emailaddress.email %} |
| 20 |
{% slot label %} |
| 21 |
{% translate "Current email" %}: |
| 22 |
{% endslot %} |
| 23 |
{% endelement %} |
| 24 |
{% endif %} |
| 25 |
{% if new_emailaddress %} |
| 26 |
{% element field id="new_email" value=new_emailaddress.email disabled=True type="email" %} |
| 27 |
{% slot label %} |
| 28 |
{% if not current_emailaddress %} |
| 29 |
{% translate "Current email" %}: |
| 30 |
{% else %} |
| 31 |
{% translate "Changing to" %}: |
| 32 |
{% endif %} |
| 33 |
{% endslot %} |
| 34 |
{% slot help_text %} |
| 35 |
{% blocktranslate %}Your email address is still pending verification.{% endblocktranslate %} |
| 36 |
{% element button form="pending-email" type="submit" name="action_send" tags="minor,secondary" %} |
| 37 |
{% trans 'Re-send Verification' %} |
| 38 |
{% endelement %} |
| 39 |
{% if current_emailaddress %} |
| 40 |
{% element button form="pending-email" type="submit" name="action_remove" tags="danger,minor" %} |
| 41 |
{% trans 'Cancel Change' %} |
| 42 |
{% endelement %} |
| 43 |
{% endif %} |
| 44 |
{% endslot %} |
| 45 |
{% endelement %} |
| 46 |
{% endif %} |
| 47 |
{% element field id=form.email.auto_id name="email" value=form.email.value errors=form.email.errors type="email" %} |
| 48 |
{% slot label %} |
| 49 |
{% translate "Change to" %}: |
| 50 |
{% endslot %} |
| 51 |
{% endelement %} |
| 52 |
{% endslot %} |
| 53 |
{% slot actions %} |
| 54 |
{% element button name="action_add" type="submit" %} |
| 55 |
{% trans "Change Email" %} |
| 56 |
{% endelement %} |
| 57 |
{% endslot %} |
| 58 |
{% endelement %} |
| 59 |
{% if new_emailaddress %} |
| 60 |
<form style="display: none" |
| 61 |
id="pending-email" |
| 62 |
method="post" |
| 63 |
action="{% url 'account_email' %}"> |
| 64 |
{% csrf_token %} |
| 65 |
<input type="hidden" name="email" value="{{ new_emailaddress.email }}"> |
| 66 |
</form> |
| 67 |
{% endif %} |
| 68 |
{% endblock content %} |