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

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

Return to bug 35725