@@ -, +, @@ holdfor $.cookie('foo', null); $.removeCookie('foo'); --- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -68,7 +68,7 @@ function checkEnter(e){ //e is event object passed from function invocation } function clearHoldFor(){ - $.cookie("holdfor",null, { path: "/", expires: 0 }); + $.removeCookie("holdfor", { path: '/' }); } function logOut(){ --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -204,7 +204,7 @@ function placeHold () { } function forgetPatron(){ - $.cookie("holdfor",null, { path: "/", expires: 0 }); + $.removeCookie("holdfor", { path: '/' }); $(".holdforlink").remove(); $("#placeholdc").html(" "+_("Place hold")+""); } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -48,7 +48,14 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %] -[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %] +[% IF ( borrowernumber ) %] + if($.cookie("holdfor") != [% borrowernumber %]){ + $.removeCookie("holdfor", { path: '/' }); + } +[% ELSE %] + $.removeCookie("holdfor", { path: '/' }); +[% END %] + [% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %] // On-site checkout --