[Bug 26899] New: Pick up location defaults to first choice if patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899 Bug ID: 26899 Summary: Pick up location defaults to first choice if patron Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: cbrannon@cdalibrary.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Pick up location defaults |Pick up location defaults |to first choice if patron |to first choice if patron's | |library is disabled as pick | |up location --- Comment #1 from Christopher Brannon <cbrannon@cdalibrary.org> --- If patron's home library is disabled as a pick up location, it defaults to the first available location in the dropdown. I'm not sure if this request should be under system administration or hold requests. I think that if their location is disabled, there should be a message in the dropdown, and disable the Confirm hold button until another location is chosen. This is what I did with jQuery: //Reroute Patron Pick-up Locations if($.inArray($('#opac-holds #members span.loggedinusername').attr('data-branchcode'), ['LAKECITY','POSTFALLS','ATHOL','RATHDRUM']) != -1) { $('#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 If the library is in the array, the button is disabled and they are forced to choose a different location. I'm going to change this slightly and have it do this if their logged in library is not in the dropdown, so we don't have to edit this list. But you get the idea. This should be a part of Koha, because this easily slips by the attention of so many patrons, and holds route to the wrong library because of it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899 --- Comment #2 from Christopher Brannon <cbrannon@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899 --- Comment #3 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 113500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113500&action=edit Bug 26988: (follow-up) Change event to focus Click event on select element if Firefox does not work as expected, so this patch changes the event to focus for it to work seamlessly in both browsers. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agustinmoyano@theke.io --- Comment #4 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Agustín Moyano from comment #3)
Created attachment 113500 [details] [review] Bug 26988: (follow-up) Change event to focus
Click event on select element if Firefox does not work as expected, so this patch changes the event to focus for it to work seamlessly in both browsers.
sorry, this was ment for bug 26988 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113500|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26899 pierre.genty@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pierre.genty@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org