[Koha-bugs] [Bug 26899] Pick up location defaults to first choice if patron's library is disabled as pick up location

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 2 19:12:38 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899

--- Comment #2 from Christopher Brannon <cbrannon at cdalibrary.org> ---
I updated the jQuery so it doesn't have to modified each time something
changes.  It just checks the patron's home library against the dropdown
choices.

//Reroute Patron Pick-up Locations
  //if($.inArray($('#opac-holds #members
span.loggedinusername').attr('data-branchcode'),
['LAKECITY','POSTFALLS','ATHOL','RATHDRUM']) != -1) {
  if ( !$('#opac-holds select[name="branch"] option[value=' + $('#opac-holds
#members span.loggedinusername').attr('data-branchcode') + ']').length ) {
    $('#opac-holds select[name="branch"]').prepend('<option value="NONE">BRANCH
CLOSED - CHOOSE PICK UP LOCATION</option>').val('NONE').width('350px');
    $('#opac-holds select[name="branch"]
option[value="NONE"]').prop('disabled', true);
    $('#opac-holds input.placehold').prop('disabled', true);
    $('#opac-holds select[name="branch"]').change(function() {
                $('#opac-holds input.placehold').prop('disabled', false);
        });
  }
//End Reroute

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list