Bug 27430: Change password minimum value hint when patron category is changed
If patrons category is changed during add or edit password minimum value doesn't change. This patch adds ajax call to fix this. To test: 1. Add password minimum length for patron categories A and B. 2. Create a new patron with category A. 3. Change patrons category to B. 4. Note that password minimum value doesn't change on hint text. 5. Apply patch. 6. Repeat patron creation, password minimum value should now change correctly. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
545c384205
commit
ef5ec1731a
2 changed files with 7 additions and 0 deletions
|
@ -1705,6 +1705,7 @@ legend:hover {
|
|||
var LABEL_SET_TO_PATRON = _("Set to patron");
|
||||
var LABEL_AGE = _("Age");
|
||||
var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?");
|
||||
var MSG_PASSWORD_LENGTH = _("Minimum password length: %s");
|
||||
|
||||
[% IF quickadd && opadd && !check_member %]
|
||||
$(document).ready(function () {
|
||||
|
|
|
@ -68,6 +68,12 @@ function update_category_code(category_code) {
|
|||
$(mytables).find("li").hide();
|
||||
$(mytables).find(" li[data-category_code='"+category_code+"']").show();
|
||||
$(mytables).find(" li[data-category_code='']").show();
|
||||
|
||||
//Change password length hint
|
||||
var hint = $("#password").siblings(".hint").first();
|
||||
var min_length = $('select'+category_selector+' option:selected').data('pwdLength');
|
||||
var hint_string = MSG_PASSWORD_LENGTH.format(min_length);
|
||||
hint.html(hint_string);
|
||||
}
|
||||
|
||||
function select_user(borrowernumber, borrower, relationship) {
|
||||
|
|
Loading…
Reference in a new issue