From 1a3c78ca05b4da67ed4563dd36277c3cdc9c8564 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Wed, 13 May 2026 23:22:36 +0200 Subject: [PATCH] Do not use custom password template for wagtail admin. --- hypha/apply/users/forms.py | 4 + .../django/forms/widgets/password.html | 74 ++++++++++--------- 2 files changed, 44 insertions(+), 34 deletions(-) diff --git a/hypha/apply/users/forms.py b/hypha/apply/users/forms.py index 9a5a97031b..b84b42070c 100644 --- a/hypha/apply/users/forms.py +++ b/hypha/apply/users/forms.py @@ -102,6 +102,10 @@ def __init__(self, *args, **kwargs): attrs={"value": "Not used - see full_name"} ) + for field_name in ("password1", "password2"): + if field_name in self.fields: + self.fields[field_name].widget.attrs["data_plain"] = True + class GroupsModelMultipleChoiceField(forms.ModelMultipleChoiceField): """ diff --git a/hypha/templates/django/forms/widgets/password.html b/hypha/templates/django/forms/widgets/password.html index fea2d77c3c..9a5fa15dd1 100644 --- a/hypha/templates/django/forms/widgets/password.html +++ b/hypha/templates/django/forms/widgets/password.html @@ -1,39 +1,45 @@ {% load i18n %} -
- -
-
- - - - - + - - - + + + +
-
+{% endif %}