From bea57b33c7e98375b6ffc047d4bd111f926f8f7a Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Fri, 28 Jun 2024 11:55:58 +0200 Subject: [PATCH] Improved style of password recovery pages (SMS) --- .../registration/password_reset_confirm.html | 17 +++++-- .../password_reset_confirm_code.html | 47 ++++++++++--------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/modoboa/templates/registration/password_reset_confirm.html b/modoboa/templates/registration/password_reset_confirm.html index c219b77d2..de3f83f71 100644 --- a/modoboa/templates/registration/password_reset_confirm.html +++ b/modoboa/templates/registration/password_reset_confirm.html @@ -5,19 +5,26 @@ {% block main_content %}
{% if validlink %} -

{% trans "Change password" %}

+

{% trans "Change password" %}

{% csrf_token %}
{% render_field form.new_password1 %}
-
- {% render_field form.new_password2 %} +
+ {{ form.new_password2 }} + {% if form.new_password2.errors %} +

+ {% for error in form.new_password2.errors %} + {{ error }} + {% endfor %} +

+ {% endif %}
- + {% else %} -
+
{% blocktrans trimmed %} The password reset link was invalid, possibly because it has already been used. Please request a new password reset. diff --git a/modoboa/templates/registration/password_reset_confirm_code.html b/modoboa/templates/registration/password_reset_confirm_code.html index 0e4fd9374..f426089bd 100644 --- a/modoboa/templates/registration/password_reset_confirm_code.html +++ b/modoboa/templates/registration/password_reset_confirm_code.html @@ -3,31 +3,34 @@ {% load i18n form_tags %} {% block main_content %} -
- {% csrf_token %} -
-
- - {{ form.code }} - {% if form.code.errors %} + - + +
{% endblock %} {% block extra_js %}