summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-19 11:17:34 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-19 11:53:56 +0200
commitee42cbd32355669304c63cbffe2c9d758e373fc2 (patch)
tree21aaeaed4fecccb6994b1c603912413082b88b75 /ogcp/templates
parent2ae6f37e60955521eb8637127b37c76c19a7f607 (diff)
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.
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/auth/edit_user.html4
1 files changed, 2 insertions, 2 deletions
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 @@
<div class="form-group">
{{ form.pwd.label(class_='form-label') }}
- {{ form.pwd(class_='form-control') }}
+ <input type="password" name="pwd" class="form-control" placeholder="{{ _('Leave blank if not changing') }}">
</div>
<div class="form-group">
{{ form.pwd_confirm.label(class_='form-label') }}
- {{ form.pwd_confirm(class_='form-control') }}
+ <input type="password" name="pwd_confirm" class="form-control" placeholder="{{ _('Leave blank if not changing') }}">
</div>
<div class="form-group form-check">