From ee42cbd32355669304c63cbffe2c9d758e373fc2 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Wed, 19 Jun 2024 11:17:34 +0200 Subject: views: make password optional in user/edit Add the option to leave the password fields empty in the form. When the passwords are not set the user keeps the old password configuration. Define a EditUserForm based on UserForm in forms/auth.py to remove the InputRequired validator in the password fields. Update the html template to make the password fields optional. --- ogcp/templates/auth/edit_user.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ogcp/templates/auth/edit_user.html') diff --git a/ogcp/templates/auth/edit_user.html b/ogcp/templates/auth/edit_user.html index b9e748d..3b10508 100644 --- a/ogcp/templates/auth/edit_user.html +++ b/ogcp/templates/auth/edit_user.html @@ -19,12 +19,12 @@
{{ form.pwd.label(class_='form-label') }} - {{ form.pwd(class_='form-control') }} +
{{ form.pwd_confirm.label(class_='form-label') }} - {{ form.pwd_confirm(class_='form-control') }} +
-- cgit v1.2.3-18-g5258