2025.10.06-03:08:05
This commit is contained in:
91
templates/account/email.html
Normal file
91
templates/account/email.html
Normal file
@@ -0,0 +1,91 @@
|
||||
{% extends "account/base_manage_email.html" %}
|
||||
{% load static allauth i18n widget_tweaks %}
|
||||
{% block head_title %}
|
||||
{% trans "Email Addresses" %}
|
||||
{% endblock head_title %}
|
||||
{% block content %}
|
||||
{% element h1 %}
|
||||
{% trans "Email Addresses" %}
|
||||
{% endelement %}
|
||||
{% if emailaddresses %}
|
||||
{% element p %}
|
||||
{% trans 'The following email addresses are associated with your account:' %}
|
||||
{% endelement %}
|
||||
{% url 'account_email' as email_url %}
|
||||
{% element form form=form action=email_url method="post" tags="email,list" %}
|
||||
{% slot body %}
|
||||
{% csrf_token %}
|
||||
{% for radio in emailaddress_radios %}
|
||||
{% with emailaddress=radio.emailaddress %}
|
||||
{% element field type="radio" checked=radio.checked name="email" value=emailaddress.email id=radio.id %}
|
||||
{% slot label %}
|
||||
{{ emailaddress.email }}
|
||||
{% if emailaddress.verified %}
|
||||
{% element badge tags="success,email,verified" %}
|
||||
{% translate "Verified" %}
|
||||
{% endelement %}
|
||||
{% else %}
|
||||
{% element badge tags="warning,email,unverified" %}
|
||||
{% translate "Unverified" %}
|
||||
{% endelement %}
|
||||
{% endif %}
|
||||
{% if emailaddress.primary %}
|
||||
{% element badge tags="email,primary" %}
|
||||
{% translate "Primary" %}
|
||||
{% endelement %}
|
||||
{% endif %}
|
||||
{% endslot %}
|
||||
{% endelement %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endslot %}
|
||||
|
||||
{% slot actions %}
|
||||
<div class="text-end">
|
||||
{% element button type="submit" class="btn btn-primary mb-3" name="action_primary" %}
|
||||
{% trans 'Make Primary' %}
|
||||
{% endelement %}
|
||||
{% element button tags="secondary" class="btn btn-secondary mb-3" type="submit" name="action_send" %}
|
||||
{% trans 'Re-send Verification' %}
|
||||
{% endelement %}
|
||||
{% element button class="btn btn-danger mb-3" tags="danger,delete" type="submit" name="action_remove" %}
|
||||
{% trans 'Remove' %}
|
||||
{% endelement %}
|
||||
</div>
|
||||
{% endslot %}
|
||||
|
||||
{% endelement %}
|
||||
{% else %}
|
||||
{% include "account/snippets/warn_no_email.html" %}
|
||||
{% endif %}
|
||||
{% if can_add_email %}
|
||||
{% element h2 %}
|
||||
{% trans "Add Email Address" %}
|
||||
{% endelement %}
|
||||
{% url 'account_email' as action_url %}
|
||||
{% element form form=form method="post" action=action_url tags="email,add" %}
|
||||
{% slot body %}
|
||||
{% csrf_token %}
|
||||
<div class="form-floating form-floating-sm mb-3">
|
||||
{% render_field form.email class="form-control" placeholder="Neue Email-Adresse" %}
|
||||
<label for="id_email">Neue Email-Adresse</label>
|
||||
</div>
|
||||
{% endslot %}
|
||||
{% slot actions %}
|
||||
<div class="text-end">
|
||||
{% element button name="action_add" class="btn btn-success" type="submit" %}
|
||||
{% trans "Add Email" %}
|
||||
{% endelement %}
|
||||
</div>
|
||||
{% endslot %}
|
||||
{% endelement %}
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
{% block extra_body %}
|
||||
<script src="{% static 'account/js/account.js' %}"></script>
|
||||
<script src="{% static 'account/js/onload.js' %}"></script>
|
||||
<script data-allauth-onload="allauth.account.forms.manageEmailForm" type="application/json">{
|
||||
"i18n": {"confirmDelete": "{% trans 'Do you really want to remove the selected email address?' %}"}
|
||||
}
|
||||
</script>
|
||||
{% endblock extra_body %}
|
||||
Reference in New Issue
Block a user