From abd757f5715590048d69500e04dcd4ff3b7c833c Mon Sep 17 00:00:00 2001 From: sonny Date: Sat, 23 May 2020 12:15:30 +0200 Subject: [PATCH] Refactor password confirm form --- .../password-reset-confirm.html | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/src/newsreader/templates/password-reset/password-reset-confirm.html b/src/newsreader/templates/password-reset/password-reset-confirm.html index c438971..93c1975 100755 --- a/src/newsreader/templates/password-reset/password-reset-confirm.html +++ b/src/newsreader/templates/password-reset/password-reset-confirm.html @@ -2,34 +2,18 @@ {% load static i18n %} {% block meta %} - - + + {% endblock %} -{% block title %}{% trans "Confirm password reset" %}{% endblock %} - {% block content %}
- {% if validlink %} -
- {% csrf_token %} -
-

- {% trans "Enter your new password below to reset your password:" %} -

-
- -
- {{ form }} -
-
- Cancel - -
-
- + {% url 'accounts:login' as cancel_url %} + {% trans "Enter your new password below to reset your password:" as title %} + {% trans "Change password" as confirm_text %} + {% include "components/form/form.html" with form=form title=title confirm_text=confirm_text cancel_url=cancel_url %} {% else %}
@@ -51,5 +35,4 @@
{% endblock %} - {# This is used by django.contrib.auth #}