@@ -, +, @@ date --- circ/circulation.pl | 18 +++++++++++------- .../prog/en/modules/circ/circulation.tt | 17 +++++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -56,7 +56,6 @@ use Date::Calc qw( ); use List::MoreUtils qw/uniq/; - # # PARAMETERS READING # @@ -123,7 +122,6 @@ my $borrowernumber = $query->param('borrowernumber'); $branch = C4::Context->userenv->{'branch'}; $printer = C4::Context->userenv->{'branchprinter'}; - # If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian if (C4::Context->preference("AutoLocation") != 1) { $template->param(ManualLocation => 1); @@ -139,6 +137,7 @@ $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); +my $restoreduedatespec = $query->param('restoreduedatespec') || $session->param('stickyduedate'); my $issueconfirmed = $query->param('issueconfirmed'); my $cancelreserve = $query->param('cancelreserve'); my $print = $query->param('print') || q{}; @@ -519,6 +518,15 @@ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{stree $template->param(%$borrower); +# Restore date if changed by holds and/or save stickyduedate to session +if ($restoreduedatespec || $stickyduedate) { + $duedatespec = $restoreduedatespec || $duedatespec; + + if ($stickyduedate) { + $session->param( 'stickyduedate', $duedatespec ); + } +} + $template->param( lib_messages_loop => $lib_messages_loop, bor_messages_loop => $bor_messages_loop, @@ -537,6 +545,7 @@ $template->param( barcode => $barcode, stickyduedate => $stickyduedate, duedatespec => $duedatespec, + restoreduedatespec => $restoreduedatespec, message => $message, totaldue => sprintf('%.2f', $total), inprocess => $inprocess, @@ -553,11 +562,6 @@ $template->param( relatives_borrowernumbers => \@relatives, ); -# save stickyduedate to session -if ($stickyduedate) { - $session->param( 'stickyduedate', $duedatespec ); -} - my ($picture, $dberror) = GetPatronImage($borrower->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -311,13 +311,15 @@ $(document).ready(function() { [% IF HIGHHOLDS %] [% END %] [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]