| 1 |
{% extends "account/base_manage_email.html" %} |
| 2 |
{% load static allauth i18n %} |
| 3 |
{% block head_title %} |
| 4 |
{% trans "Email Addresses" %} |
| 5 |
{% endblock head_title %} |
| 6 |
{% block content %} |
| 7 |
{% element h1 %} |
| 8 |
{% trans "Email Addresses" %} |
| 9 |
{% endelement %} |
| 10 |
{% if emailaddresses %} |
| 11 |
{% element p %} |
| 12 |
{% trans 'The following email addresses are associated with your account:' %} |
| 13 |
{% endelement %} |
| 14 |
{% url 'account_email' as email_url %} |
| 15 |
{% element form form=form action=email_url method="post" tags="email,list" %} |
| 16 |
{% slot body %} |
| 17 |
{% csrf_token %} |
| 18 |
{% for radio in emailaddress_radios %} |
| 19 |
{% with emailaddress=radio.emailaddress %} |
| 20 |
{% element field type="radio" checked=radio.checked name="email" value=emailaddress.email id=radio.id %} |
| 21 |
{% slot label %} |
| 22 |
{{ emailaddress.email }} |
| 23 |
{% if emailaddress.verified %} |
| 24 |
{% element badge tags="success,email,verified" %} |
| 25 |
{% translate "Verified" %} |
| 26 |
{% endelement %} |
| 27 |
{% else %} |
| 28 |
{% element badge tags="warning,email,unverified" %} |
| 29 |
{% translate "Unverified" %} |
| 30 |
{% endelement %} |
| 31 |
{% endif %} |
| 32 |
{% if emailaddress.primary %} |
| 33 |
{% element badge tags="email,primary" %} |
| 34 |
{% translate "Primary" %} |
| 35 |
{% endelement %} |
| 36 |
{% endif %} |
| 37 |
{% endslot %} |
| 38 |
{% endelement %} |
| 39 |
{% endwith %} |
| 40 |
{% endfor %} |
| 41 |
{% endslot %} |
| 42 |
{% slot actions %} |
| 43 |
{% element button type="submit" name="action_primary" %} |
| 44 |
{% trans 'Make Primary' %} |
| 45 |
{% endelement %} |
| 46 |
{% element button tags="secondary" type="submit" name="action_send" %} |
| 47 |
{% trans 'Re-send Verification' %} |
| 48 |
{% endelement %} |
| 49 |
{% element button tags="danger,delete" type="submit" name="action_remove" %} |
| 50 |
{% trans 'Remove' %} |
| 51 |
{% endelement %} |
| 52 |
{% endslot %} |
| 53 |
{% endelement %} |
| 54 |
{% else %} |
| 55 |
{% include "account/snippets/warn_no_email.html" %} |
| 56 |
{% endif %} |
| 57 |
{% if can_add_email %} |
| 58 |
{% element h2 %} |
| 59 |
{% trans "Add Email Address" %} |
| 60 |
{% endelement %} |
| 61 |
{% url 'account_email' as action_url %} |
| 62 |
{% element form form=form method="post" action=action_url tags="email,add" %} |
| 63 |
{% slot body %} |
| 64 |
{% csrf_token %} |
| 65 |
{% element fields form=form %} |
| 66 |
{% endelement %} |
| 67 |
{% endslot %} |
| 68 |
{% slot actions %} |
| 69 |
{% element button name="action_add" type="submit" %} |
| 70 |
{% trans "Add Email" %} |
| 71 |
{% endelement %} |
| 72 |
{% endslot %} |
| 73 |
{% endelement %} |
| 74 |
{% endif %} |
| 75 |
{% endblock content %} |
| 76 |
{% block extra_body %} |
| 77 |
<script src="{% static 'account/js/account.js' %}"></script> |
| 78 |
<script src="{% static 'account/js/onload.js' %}"></script> |
| 79 |
<script data-allauth-onload="allauth.account.forms.manageEmailForm" type="application/json">{ |
| 80 |
"i18n": {"confirmDelete": "{% trans 'Do you really want to remove the selected email address?' %}"} |
| 81 |
} |
| 82 |
</script> |
| 83 |
{% endblock extra_body %} |