https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34668 --- Comment #11 from Nick Clemens <nick@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.