[Koha-bugs] [Bug 34668] Add syspref to popup warn librarians of waiting holds for the patrons whose items they are checking out
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Oct 12 21:18:12 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34668
--- Comment #11 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Shi Yao Wang from comment #10)
> (In reply to Nick Clemens from comment #9)
> I currently do not see how this can be done without binding/unbinding events
> of the "Check out" button depending on the barcode input. Can I get more
> details on how to do what you suggest?
Something like this:
$("#mainform").on('submit', function(){
if( $("#checkout_confirmed").length > 0 ){
return true;
}
if (
waiting_holds_barcodes.includes($('#barcode').val().trim()) ) {
return true;
} else {
$('#circ-warnwaitingholds-modal').modal();
return false;
}
});
$("#circ-warnwaitingholds-modal").on('hidden.bs.modal',function(){
$("#mainform").append('<input type="hidden"
id="checkout_confirmed" value=1>').submit();
});
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list