From 33e1b3bce56b53dd354930d4f728ee0be3e0b68a Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Wed, 9 Dec 2020 15:17:15 -0300 Subject: [PATCH] Bug 27148: (follow-up) Fix require_strong variable set Signed-off-by: Jonathan Druart (cherry picked from commit 03839d40b1fd58a3863a1153a6ae44d1002d9afb) Signed-off-by: Fridolin Somers --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index d7b3be3987..e7212c4225 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -1238,8 +1238,8 @@ var default_strong_password = [% defaultCategory.effective_require_strong_password | html %]; $(document).ready(function() { var setPwdMessage = function() { - var require_strong = $('select#borrower_categorycode option:selected').data('pwdStrong')||default_strong_password; - var min_lenght = $('select#borrower_categorycode option:selected').data('pwdLength')||default_password_length; + var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password; + var min_lenght = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length; $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_lenght)); }; setPwdMessage(); -- 2.39.5