From edaa89a5d7a886fc6191054d27e835cda0d14d63 Mon Sep 17 00:00:00 2001 From: sonny Date: Sat, 23 May 2020 11:40:54 +0200 Subject: [PATCH] Refactor password-change view --- .../templates/accounts/views/login.html | 2 -- .../accounts/views/password-change.html | 22 ++++--------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/newsreader/accounts/templates/accounts/views/login.html b/src/newsreader/accounts/templates/accounts/views/login.html index 333e02d..b4c391d 100644 --- a/src/newsreader/accounts/templates/accounts/views/login.html +++ b/src/newsreader/accounts/templates/accounts/views/login.html @@ -1,7 +1,5 @@ {% extends "base.html" %} -{% load static %} - {% block content %}
{% include "accounts/components/login-form.html" with form=form title="Login" confirm_text="Login" %} diff --git a/src/newsreader/accounts/templates/accounts/views/password-change.html b/src/newsreader/accounts/templates/accounts/views/password-change.html index 1ece1dd..5f7b852 100644 --- a/src/newsreader/accounts/templates/accounts/views/password-change.html +++ b/src/newsreader/accounts/templates/accounts/views/password-change.html @@ -1,22 +1,8 @@ {% extends "base.html" %} -{% load static i18n %} {% block content %} -
-
- {% csrf_token %} - -
-

{% trans "Password change" %}

-
- -
- {{ form }} -
-
- Cancel - -
-
-
+
+ {% url 'accounts:settings' as cancel_url %} + {% include "components/form/form.html" with form=form title="Change password" confirm_text="Change password" cancel_url=cancel_url %} +
{% endblock %}