From 06b7e758a7c253d9fb3976f0c76d98203e7a1304 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Thu, 3 Oct 2024 21:10:58 +0000 Subject: [PATCH 1/4] feat: extend password-change template and remove breadcrumbs/sidebar --- benefits/templates/registration/password_change_form.html | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 benefits/templates/registration/password_change_form.html diff --git a/benefits/templates/registration/password_change_form.html b/benefits/templates/registration/password_change_form.html new file mode 100644 index 0000000000..d2fe8fd979 --- /dev/null +++ b/benefits/templates/registration/password_change_form.html @@ -0,0 +1,7 @@ +{% extends "registration/password_change_form.html" %} + +{% block nav-breadcrumbs %} +{% endblock nav-breadcrumbs %} + +{% block nav-sidebar %} +{% endblock nav-sidebar %} From 407c8faffdd6c3c654cdccd99e5349de521aed0e Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Thu, 3 Oct 2024 21:13:22 +0000 Subject: [PATCH 2/4] feat: use admin styles / Bootstrap on password-change template --- .../templates/registration/password_change_form.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/benefits/templates/registration/password_change_form.html b/benefits/templates/registration/password_change_form.html index d2fe8fd979..9117625642 100644 --- a/benefits/templates/registration/password_change_form.html +++ b/benefits/templates/registration/password_change_form.html @@ -1,4 +1,14 @@ {% extends "registration/password_change_form.html" %} +{% load static %} + +{% block extrastyle %} + + + +{% endblock extrastyle %} {% block nav-breadcrumbs %} {% endblock nav-breadcrumbs %} From b4dd7ea44e2dd567612b6e5577c95d13d681513d Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Thu, 3 Oct 2024 21:17:04 +0000 Subject: [PATCH 3/4] feat: override branding and usertools blocks to match other admin pages --- .../registration/password_change_form.html | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/benefits/templates/registration/password_change_form.html b/benefits/templates/registration/password_change_form.html index 9117625642..43843299c3 100644 --- a/benefits/templates/registration/password_change_form.html +++ b/benefits/templates/registration/password_change_form.html @@ -10,6 +10,45 @@ {% endblock extrastyle %} +{% block branding %} + +{% endblock branding %} + +{% block usertools %} + {% if has_permission %} +
+ {% block welcome-msg %} + + Welcome, + {% firstof user.get_short_name user.get_username %}. + + {% endblock welcome-msg %} + {% block userlinks %} + {% if user.is_active and user.is_staff %} + {% url 'django-admindocs-docroot' as docsroot %} + {% if docsroot %}Documentation /{% endif %} + {% endif %} + {% if user.has_usable_password %} + Change password / + {% endif %} + +
+ {% csrf_token %} + +
+ {% endblock userlinks %} +
+ {% endif %} +{% endblock usertools %} + {% block nav-breadcrumbs %} {% endblock nav-breadcrumbs %} From 1be4778300d394f9ced0e72449fea90f358695d4 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Thu, 3 Oct 2024 21:35:22 +0000 Subject: [PATCH 4/4] feat: apply same style overriding for password-change-done --- .../registration/password_change_done.html | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 benefits/templates/registration/password_change_done.html diff --git a/benefits/templates/registration/password_change_done.html b/benefits/templates/registration/password_change_done.html new file mode 100644 index 0000000000..8f33425eb5 --- /dev/null +++ b/benefits/templates/registration/password_change_done.html @@ -0,0 +1,66 @@ +{% extends "registration/password_change_done.html" %} +{% load static %} + +{% block extrastyle %} + + + +{% endblock extrastyle %} + +{% block branding %} + +{% endblock branding %} + +{% block usertools %} + {% if has_permission %} +
+ {% block welcome-msg %} + + Welcome, + {% firstof user.get_short_name user.get_username %}. + + {% endblock welcome-msg %} + {% block userlinks %} + {% if user.is_active and user.is_staff %} + {% url 'django-admindocs-docroot' as docsroot %} + {% if docsroot %}Documentation /{% endif %} + {% endif %} + {% if user.has_usable_password %} + Change password / + {% endif %} + +
+ {% csrf_token %} + +
+ {% endblock userlinks %} +
+ {% endif %} +{% endblock usertools %} + +{% block nav-breadcrumbs %} +{% endblock nav-breadcrumbs %} + +{% block nav-sidebar %} +{% endblock nav-sidebar %} + +{% block content %} + {{ block.super }} + + +{% endblock content %}