Store the stickyduedate in the session. So "Remember for Session" means for session rather than "while on this page".
Includes some updates since initial submission of patch. --- circ/circulation.pl | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index d51f2d3..c10676d 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -114,8 +114,8 @@ if (C4::Context->preference("AutoLocation") ne 1) { # FIXME: string comparison t my $barcode = $query->param('barcode') || ''; $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); -my $stickyduedate = $query->param('stickyduedate'); -my $duedatespec = $query->param('duedatespec'); +my $stickyduedate = $query->param('stickyduedate') || $session->param( 'stickyduedate' ); +my $duedatespec = $query->param('duedatespec') || $session->param( 'stickyduedate' ); my $issueconfirmed = $query->param('issueconfirmed'); my $cancelreserve = $query->param('cancelreserve'); my $organisation = $query->param('organisations'); @@ -123,6 +123,16 @@ my $print = $query->param('print'); my $newexpiry = $query->param('dateexpiry'); my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice +# Check if stickyduedate is turned off +if ( $barcode ) { + # was stickyduedate loaded from session? + if ( $stickyduedate && ! $query->param("stickyduedate") ) { + $session->clear( 'stickyduedate' ); + $stickyduedate = $query->param('stickyduedate'); + $duedatespec = $query->param('duedatespec'); + } +} + #set up cookie..... # my $branchcookie; # my $printercookie; @@ -693,6 +703,10 @@ $template->param( circview => 1, ); +# save stickyduedate to session +if ($stickyduedate) { + $session->param( 'stickyduedate', $duedatespec ); +} #if ($branchcookie) { #$cookie=[$cookie, $branchcookie, $printercookie]; -- 1.5.6.3 _______________________________________________ Koha-patches mailing list Koha-patches@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-patches