Make stickyduedate remember for session a little more permanent
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. Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
5899badc3e
commit
e8e632f8db
|
|
@ -115,8 +115,8 @@ my $barcode = $query->param('barcode') || '';
|
|||
$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
|
||||
|
||||
$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');
|
||||
|
|
@ -124,6 +124,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;
|
||||
|
|
@ -694,6 +704,10 @@ $template->param(
|
|||
circview => 1,
|
||||
);
|
||||
|
||||
# save stickyduedate to session
|
||||
if ($stickyduedate) {
|
||||
$session->param( 'stickyduedate', $duedatespec );
|
||||
}
|
||||
|
||||
#if ($branchcookie) {
|
||||
#$cookie=[$cookie, $branchcookie, $printercookie];
|
||||
|
|
|
|||
Loading…
Reference in New Issue