Lines 120-131
Link Here
|
120 |
[% INCLUDE "${cwd}/shared-includes/shared.js" %] |
120 |
[% INCLUDE "${cwd}/shared-includes/shared.js" %] |
121 |
// Require a username and branch selection |
121 |
// Require a username and branch selection |
122 |
document.addEventListener('DOMContentLoaded', function(){ |
122 |
document.addEventListener('DOMContentLoaded', function(){ |
123 |
$('#create_form #cardnumber, #create_form #branchcode').change(function() { |
123 |
let cardnumber_input = '#create_form #cardnumber'; |
124 |
var comp = ['#cardnumber','#branchcode'].filter(function(id) { |
124 |
let branchcode_input = '#create_form #branchcode'; |
125 |
return $(id).val().length > 0; |
125 |
updateCreateButtonStatus(); |
126 |
}); |
126 |
$(cardnumber_input + ',' + branchcode_input).change(function() { |
127 |
$('#ill-submit').attr('disabled', comp.length < 2); |
127 |
updateCreateButtonStatus(); |
|
|
128 |
}); |
129 |
function updateCreateButtonStatus(){ |
130 |
var comp = [cardnumber_input,branchcode_input].filter(function(id) { |
131 |
return $(id).val().length > 0; |
128 |
}); |
132 |
}); |
|
|
133 |
$('#ill-submit').attr('disabled', comp.length < 2); |
134 |
} |
129 |
/* Maintain patron autocomplete compatibility across versions */ |
135 |
/* Maintain patron autocomplete compatibility across versions */ |
130 |
[% IF koha_version.major <= 22 && koha_version.minor < 11 %] |
136 |
[% IF koha_version.major <= 22 && koha_version.minor < 11 %] |
131 |
$('#create_form #cardnumber').autocomplete({ |
137 |
$('#create_form #cardnumber').autocomplete({ |
132 |
- |
|
|