From c520925a31c1ae123a1eedffeca7f5135ab875c7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 1 Jun 2022 14:29:59 +0200 Subject: [PATCH] Bug 30864: Add validation to password_expiry_days When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field. If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved. To test: 1. Go to Administration > Patrons and circulation > Patron categories. 2. Add a new patron category (or edit an existing category). 3. For the "Password expiration" field, enter letters or characters such as L$%. => Note that you are prompted to "Please enter only digits" Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 79396ae625ac772e4a6c01f2649a7147a07cc7b7) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/js/categories.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/categories.js b/koha-tmpl/intranet-tmpl/prog/js/categories.js index efecda4e7e..90a8a33ac2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/categories.js +++ b/koha-tmpl/intranet-tmpl/prog/js/categories.js @@ -64,6 +64,9 @@ $(document).ready(function() { }, enrollment_period: true }, + password_expiry_days: { + digits: true + }, dateofbirthrequired: { digits: true }, -- 2.20.1