From ed641c85571df0461b4f0cbf5a6ba2b3363a0b5d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 12 Feb 2020 15:49:17 +0100 Subject: [PATCH] Bug 24549: Do not set "last patron" cookie if showLastPatron is disabled If the showLastPatron syspref is disabled, we should not store the 3 cookies we use for this feature. Test plan: 0/ Do not apply this patch 1/ Turn off showLastPatron 2/ Search for a patron, click on a result 3/ Open the cookie list of your browser => You see 3 cookies named lastborrowercard, lastborrowername, lastborrowernumber 4/ Remove them 5/ Apply the patch 6/ Reload the patron detail page => The 3 cookies are not created 7/ Turn the pref on 8/ Reload the patron detail page => The 3 cookies are created 9/ Eat one of them. QA note: it's a bit dirty, we should do that JS side, but staff-global.js is too widely used to make the change easy. Any other suggestions welcomed. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index a8328bca4a..95ace5e248 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -3,9 +3,11 @@ [% IF ( patron.borrowernumber ) %]
[% INCLUDE 'patron-title.inc' %]
- - - +[% IF Koha.Preference('showLastPatron') %] + + + +[% END %] [% IF ( patronimages ) %]
-- 2.39.5