Bug 34668: pass whole waiting_holds rs
Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
0c8544f348
commit
fa444f549d
|
|
@ -630,15 +630,8 @@ if ( $patron ) {
|
|||
$template->param( patron_messages => $patron_messages );
|
||||
|
||||
if ( C4::Context->preference("WaitingNotifyAtCheckout") ) {
|
||||
|
||||
#Check for waiting holds
|
||||
my $waiting_holds = $patron->holds->search( { found => 'W', branchcode => $branch } );
|
||||
my @waiting_holds_barcodes = ();
|
||||
while ( my $hold = $waiting_holds->next ) {
|
||||
push( @waiting_holds_barcodes, $hold->item->barcode );
|
||||
}
|
||||
|
||||
$template->param( waiting_holds_barcodes => \@waiting_holds_barcodes );
|
||||
my $waiting_holds = $patron->holds->search( { found => 'W', branchcode => $branch } );
|
||||
$template->param( waiting_holds => $waiting_holds );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -961,7 +961,7 @@
|
|||
</div> <!-- /.modal-dialog -->
|
||||
</div> <!-- /#barcodeSubmittedModal -->
|
||||
|
||||
[% IF waiting_holds_barcodes %]
|
||||
[% IF waiting_holds %]
|
||||
<div id="circ-warnwaitingholds-modal" class="modal fade audio-alert-action block">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
|
@ -1050,14 +1050,14 @@
|
|||
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
|
||||
}
|
||||
$(document).ready(function() {
|
||||
[% IF waiting_holds_barcodes %]
|
||||
[% IF waiting_holds %]
|
||||
$('#circ-warnwaitingholds-modal .btn-primary').on('click',function() {
|
||||
$('#mainform').submit();
|
||||
});
|
||||
|
||||
var waiting_holds_barcodes = new Array();
|
||||
[% FOREACH b IN waiting_holds_barcodes %]
|
||||
waiting_holds_barcodes.push("[% b | html %]");
|
||||
[% FOREACH wh IN waiting_holds %]
|
||||
waiting_holds_barcodes.push("[% wh.item.barcode | html %]");
|
||||
[% END %]
|
||||
$("#mainform").on('submit', function(){
|
||||
if( $("#checkout_confirmed").length > 0 ){
|
||||
|
|
|
|||
Loading…
Reference in New Issue