Update email page layout

This commit is contained in:
Alexandre Iooss 2022-12-26 00:01:53 +01:00
parent 4ce88a36b0
commit 09f30543fa

View file

@ -28,9 +28,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% csrf_token %}
<fieldset class="blockLabels">
{% for emailaddress in user.emailaddress_set.all %}
<div class="ctrlHolder">
<label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
<div class="form-check">
<input class="form-check-input" id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked"{% endif %} value="{{ emailaddress.email }}"/>
<label class="form-check-label" for="email_radio_{{forloop.counter}}">
{{ emailaddress.email }}
{% if emailaddress.verified %}
<span class="badge bg-success">{% trans "Verified" %}</span>
@ -41,7 +41,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</label>
</div>
{% endfor %}
<div class="mt-2 mb-4">
<button class="btn btn-sm btn-secondary" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
<button class="btn btn-sm btn-secondary" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
@ -52,10 +52,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% else %}
<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
{% endif %}
{% if can_add_email %}
<h2>{% trans "Add E-mail Address" %}</h2>
<form method="post" action="{% url 'account_email' %}" class="add_email">
{% csrf_token %}
{{ form|crispy }}