diff --git a/circ/add_message.pl b/circ/add_message.pl index aee65a1b91..4233e9077e 100755 --- a/circ/add_message.pl +++ b/circ/add_message.pl @@ -41,6 +41,7 @@ my $borrowernumber = $input->param('borrowernumber'); my $branchcode = $input->param('branchcode'); my $message_type = $input->param('message_type'); my $borrower_message = $input->param('borrower_message'); +my $batch = $input->param('batch'); Koha::Patron::Message->new( { @@ -51,5 +52,14 @@ Koha::Patron::Message->new( } )->store; -my $url = $input->referer() // "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber"; +my $url = $input->referer; +if ( $url ) { + if ( $url =~ m|circulation\.pl$| ) { + # Trick for POST form from batch checkouts + $url .= "?borrowernumber=$borrowernumber"; + $url .= "&batch=1" if $batch; + } +} else { + $url = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber"; +} print $input->redirect($url); diff --git a/circ/circulation.pl b/circ/circulation.pl index ef743bedc5..24c8110cb3 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -644,6 +644,7 @@ $template->param( is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), $view => 1, batch_allowed => $batch_allowed, + batch => $batch, AudioAlerts => C4::Context->preference("AudioAlerts"), fast_cataloging => $fast_cataloging, CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 75cb6bc893..7f7fe5c4ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -248,6 +248,7 @@ function searchToHold(){ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index e36dfc0de7..7ef4436ed9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -79,7 +79,7 @@ $(document).ready(function() { [% END %] [% ELSIF borrower and not checkout_infos %] -