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 %} {% csrf_token %}
<fieldset class="blockLabels"> <fieldset class="blockLabels">
{% for emailaddress in user.emailaddress_set.all %} {% for emailaddress in user.emailaddress_set.all %}
<div class="ctrlHolder"> <div class="form-check">
<label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}"> <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 }}"/>
<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 }} {{ emailaddress.email }}
{% if emailaddress.verified %} {% if emailaddress.verified %}
<span class="badge bg-success">{% trans "Verified" %}</span> <span class="badge bg-success">{% trans "Verified" %}</span>
@ -41,7 +41,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</label> </label>
</div> </div>
{% endfor %} {% endfor %}
<div class="mt-2 mb-4"> <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_primary" >{% trans 'Make Primary' %}</button>
<button class="btn btn-sm btn-secondary" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</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 %} {% 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> <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 %} {% endif %}
{% if can_add_email %} {% if can_add_email %}
<h2>{% trans "Add E-mail Address" %}</h2> <h2>{% trans "Add E-mail Address" %}</h2>
<form method="post" action="{% url 'account_email' %}" class="add_email"> <form method="post" action="{% url 'account_email' %}" class="add_email">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}