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

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

Return to bug 35725