Bug 37055: Check count of holds, not if defined

To test:
 - enable WaitingNotifyAtCheckout
 - have or create a waiting hold for a patron
 - check out an item to a different patron who does not have a waiting hold
 - Koha says "This patron has waiting holds that are available for checkout"
 - Apply patch
 - Reload patron (click 'Checkout' tab)
 - Check out an item - no warning
 - Find the patron with waiting hold
 - Check out an item - warning
 - Checkout the waiting item - no warning

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Nick Clemens 2024-06-14 18:02:02 +00:00 committed by Katrin Fischer
parent a964d98dc8
commit b5f122696c
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -965,7 +965,7 @@
</div> <!-- /.modal-dialog -->
</div> <!-- /#barcodeSubmittedModal -->
[% IF waiting_holds %]
[% IF waiting_holds.count > 0 %]
<div id="circ-warnwaitingholds-modal" class="modal fade audio-alert-action block">
<div class="modal-dialog">
<div class="modal-content">
@ -1064,7 +1064,7 @@
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
}
$(document).ready(function() {
[% IF waiting_holds %]
[% IF waiting_holds.count > 0 %]
$('#circ-warnwaitingholds-modal .btn-primary').on('click',function() {
$('#mainform').submit();
});