| 1 |
{% extends "account/base_manage_phone.html" %} |
| 2 |
{% load i18n %} |
| 3 |
{% load allauth %} |
| 4 |
{% block head_title %} |
| 5 |
{% trans "Change Phone" %} |
| 6 |
{% endblock head_title %} |
| 7 |
{% block content %} |
| 8 |
{% element h1 %} |
| 9 |
{% trans "Change Phone" %} |
| 10 |
{% endelement %} |
| 11 |
{% url 'account_change_phone' as action_url %} |
| 12 |
{% element form method="post" action=action_url %} |
| 13 |
{% slot body %} |
| 14 |
{% csrf_token %} |
| 15 |
{% if phone %} |
| 16 |
{% element field id="current_phone" disabled=True type="tel" value=phone %} |
| 17 |
{% slot label %} |
| 18 |
{% translate "Current phone" %}: |
| 19 |
{% endslot %} |
| 20 |
{% if not phone_verified %} |
| 21 |
{% slot help_text %} |
| 22 |
{% blocktranslate %}Your phone number is still pending verification.{% endblocktranslate %} |
| 23 |
{% element button form="verify-phone" type="submit" tags="minor,secondary" %} |
| 24 |
{% trans 'Re-send Verification' %} |
| 25 |
{% endelement %} |
| 26 |
{% endslot %} |
| 27 |
{% endif %} |
| 28 |
{% endelement %} |
| 29 |
{% endif %} |
| 30 |
{% element field id=form.phone.auto_id name="phone" value=form.phone.value errors=form.phone.errors type="tel" %} |
| 31 |
{% slot label %} |
| 32 |
{% translate "Change to" %}: |
| 33 |
{% endslot %} |
| 34 |
{% endelement %} |
| 35 |
{% endslot %} |
| 36 |
{% slot actions %} |
| 37 |
{% element button name="action_add" type="submit" %} |
| 38 |
{% translate "Change Phone" context "action" %} |
| 39 |
{% endelement %} |
| 40 |
{% endslot %} |
| 41 |
{% endelement %} |
| 42 |
{% if not phone_verified %} |
| 43 |
<form style="display: none" |
| 44 |
id="verify-phone" |
| 45 |
method="post" |
| 46 |
action="{{ action_url }}"> |
| 47 |
{% csrf_token %} |
| 48 |
<input type="hidden" name="action" value="verify"> |
| 49 |
</form> |
| 50 |
{% endif %} |
| 51 |
{% endblock content %} |