Lines 82-88
Link Here
|
82 |
[% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %] |
82 |
[% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %] |
83 |
[% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %] |
83 |
[% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %] |
84 |
[% IF field == "password_too_short" %] |
84 |
[% IF field == "password_too_short" %] |
85 |
<li>Password must be at least [% minPasswordLength | html %] characters long.</li> |
85 |
<li>Password must be at least [% patron.category.effective_min_password_length | html %] characters long.</li> |
86 |
[% END %] |
86 |
[% END %] |
87 |
[% IF field == "password_too_weak" %] |
87 |
[% IF field == "password_too_weak" %] |
88 |
<li>Password must contain at least one digit, one lowercase and one uppercase.</li> |
88 |
<li>Password must contain at least one digit, one lowercase and one uppercase.</li> |
Lines 252-260
Link Here
|
252 |
<select id="borrower_categorycode" name="borrower_categorycode"> |
252 |
<select id="borrower_categorycode" name="borrower_categorycode"> |
253 |
[% FOREACH c IN Categories.all() %] |
253 |
[% FOREACH c IN Categories.all() %] |
254 |
[% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %] |
254 |
[% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %] |
255 |
<option value="[% c.categorycode | html %]" selected="selected">[% c.description | html %]</option> |
255 |
<option value="[% c.categorycode | html %]" data-pwd-length="[% c.effective_min_password_length | html %]" data-pwd-strong="[% c.effective_require_strong_password | html %]" selected="selected">[% c.description | html %]</option> |
256 |
[% ELSE %] |
256 |
[% ELSE %] |
257 |
<option value="[% c.categorycode | html %]">[% c.description | html %]</option> |
257 |
<option value="[% c.categorycode | html %]" data-pwd-length="[% c.effective_min_password_length | html %]" data-pwd-strong="[% c.effective_require_strong_password | html %]">[% c.description | html %]</option> |
258 |
[% END %] |
258 |
[% END %] |
259 |
[% END %] |
259 |
[% END %] |
260 |
</select> |
260 |
</select> |
Lines 866-875
Link Here
|
866 |
<fieldset class="rows" id="memberentry_password"> |
866 |
<fieldset class="rows" id="memberentry_password"> |
867 |
<legend id="contact_legend">Password</legend> |
867 |
<legend id="contact_legend">Password</legend> |
868 |
<div class="alert alert-info"> |
868 |
<div class="alert alert-info"> |
869 |
[% IF ( Koha.Preference('RequireStrongPassword') ) %] |
869 |
[% IF patron %] |
870 |
<p>Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</p> |
870 |
[% IF ( patron.category.effective_require_strong_password ) %] |
|
|
871 |
<p>Your password must contain at least [% patron.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</p> |
872 |
[% ELSE %] |
873 |
<p>Your password must be at least [% patron.category.effective_min_password_length | html %] characters long.</p> |
874 |
[% END %] |
871 |
[% ELSE %] |
875 |
[% ELSE %] |
872 |
<p>Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</p> |
876 |
<p id="password_alert"></p> |
873 |
[% END %] |
877 |
[% END %] |
874 |
[% UNLESS mandatory.defined('password') %] |
878 |
[% UNLESS mandatory.defined('password') %] |
875 |
<p>If you do not enter a password a system generated password will be created.</p> |
879 |
<p>If you do not enter a password a system generated password will be created.</p> |
Lines 1016-1023
Link Here
|
1016 |
[% INCLUDE 'opac-bottom.inc' %] |
1020 |
[% INCLUDE 'opac-bottom.inc' %] |
1017 |
[% BLOCK jsinclude %] |
1021 |
[% BLOCK jsinclude %] |
1018 |
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %] |
1022 |
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %] |
1019 |
[% PROCESS 'password_check.inc' %] |
1023 |
|
1020 |
[% PROCESS 'add_password_check' new_password => 'borrower_password' %] |
|
|
1021 |
<script> |
1024 |
<script> |
1022 |
//<![CDATA[ |
1025 |
//<![CDATA[ |
1023 |
$(document).ready(function() { |
1026 |
$(document).ready(function() { |
Lines 1178-1184
Link Here
|
1178 |
}); |
1181 |
}); |
1179 |
}); |
1182 |
}); |
1180 |
[% END %] |
1183 |
[% END %] |
|
|
1184 |
|
1185 |
[% UNLESS patron %] |
1186 |
var PWD_STRONG_MSG = _("Password must contain at least %s characters, including UPPERCASE, lowercase and numbers"); |
1187 |
var PWD_WEAK_MSG = _("Password must contain at least %s characters"); |
1188 |
$(document).ready(function() { |
1189 |
var setPwdMessage = function() { |
1190 |
var require_strong = $('select#borrower_categorycode option:selected').data('pwdStrong'); |
1191 |
var min_lenght = $('select#borrower_categorycode option:selected').data('pwdLength'); |
1192 |
$('#password_alert').html((require_strong?PWD_STRONG_MSG:PWD_WEAK_MSG).format(min_lenght)); |
1193 |
}; |
1194 |
setPwdMessage(); |
1195 |
$('select#borrower_categorycode').change(setPwdMessage); |
1196 |
}); |
1197 |
[% END %] |
1181 |
//]]> |
1198 |
//]]> |
1182 |
</script> |
1199 |
</script> |
1183 |
[% INCLUDE 'calendar.inc' %] |
1200 |
[% PROCESS 'password_check.inc' new_password => 'borrower_password', category_selector => '#borrower_categorycode', RequireStrongPassword => patron.category.effective_require_strong_password, minPasswordLength => patron.category.effective_min_password_length %] |
|
|
1201 |
|
1184 |
[% END %] |
1202 |
[% END %] |