From 939bb82df4a993502d39bfb852b348547746cafa Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 7 Jul 2023 17:45:51 +0200 Subject: ✨ enable password recovering by email MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../registration/password_reset_confirm.html | 49 ++++++++++++++++------ .../registration/password_reset_email.html | 2 +- 2 files changed, 37 insertions(+), 14 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/registration/password_reset_confirm.html b/ishtar_common/templates/registration/password_reset_confirm.html index b0e2cc142..6129d259b 100644 --- a/ishtar_common/templates/registration/password_reset_confirm.html +++ b/ishtar_common/templates/registration/password_reset_confirm.html @@ -3,19 +3,42 @@ {% block content %} -{% if validlink %} -
-
{% csrf_token %} - - {{ form.as_table }} - -
-
-
-{% else %} -
-

{% trans "Password reset failed" %}

+
+
+
+

{{page_title}}

+ {% if validlink %} +
{% csrf_token %} + {% if form.non_field_errors %} +
+ {% for error in form.non_field_errors %} +
+ {{error}} +
+ {% endfor %} +
+ {% endif %} + {% with force_large_col=True %} + {% for field in form %} + {% include "blocks/bs_field_snippet.html" %} + {% endfor %} + {% endwith %} + +
+
+ +
+
+
+ {% else %} +
+

{% trans "Password reset failed" %}

+
+ {% endif %} +
+
-{% endif %} + + {% endblock %} diff --git a/ishtar_common/templates/registration/password_reset_email.html b/ishtar_common/templates/registration/password_reset_email.html index 05612cf58..ad81d141b 100644 --- a/ishtar_common/templates/registration/password_reset_email.html +++ b/ishtar_common/templates/registration/password_reset_email.html @@ -1,5 +1,5 @@ {% load i18n %} {% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}: {% block reset_link %} -{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb36=uid, token=token %} +{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} {% endblock %} -- cgit v1.2.3