View | Details | Raw Unified | Return to bug 27148
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-4 / +3 lines)
Lines 1235-1246 Link Here
1235
        var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers");
1235
        var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers");
1236
        var PWD_WEAK_MSG = _("Password must contain at least %s characters");
1236
        var PWD_WEAK_MSG = _("Password must contain at least %s characters");
1237
        var default_password_length = [% defaultCategory.effective_min_password_length | html %];
1237
        var default_password_length = [% defaultCategory.effective_min_password_length | html %];
1238
        var default_strong_password = [% defaultCategory.effective_require_strong_password | html %];
1238
        var default_strong_password = [% defaultCategory.effective_require_strong_password ? defaultCategory.effective_require_strong_password : 0 | html %];
1239
        $(document).ready(function() {
1239
        $(document).ready(function() {
1240
            var setPwdMessage = function() {
1240
            var setPwdMessage = function() {
1241
                var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password;
1241
                var require_strong = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdStrong') : default_strong_password;
1242
                var min_lenght = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length;
1242
                var min_length = $('select#borrower_categorycode option:selected').length ? $('select#borrower_categorycode option:selected').data('pwdLength') : default_password_length;
1243
                $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_lenght));
1243
                $('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_length));
1244
            };
1244
            };
1245
            setPwdMessage();
1245
            setPwdMessage();
1246
            $('select#borrower_categorycode').change(setPwdMessage);
1246
            $('select#borrower_categorycode').change(setPwdMessage);
1247
- 

Return to bug 27148