From 9fb4aa36c6dda1e206b0c28a4da554c225357305 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Fri, 18 Aug 2017 10:58:51 +0000 Subject: [PATCH] Bug 15752: (QA follow-up) Inform user that patron was automatically switched Test plan: 1) Start checking out to some patron - there should be no message about auto switching 2) read the another patrons card - note the patron is switched and there is a message about it at top of the main page content Followed test plan, patch worked as described. Passed QA test tool Signed-off-by: Alex Buckley Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- circ/circulation.pl | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 3df7b1ebf3..cd7b5501f2 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -86,7 +86,7 @@ my $barcode = $query->param('barcode'); if (C4::Context->preference("AutoSwitchPatron") && $barcode) { if (Koha::Patrons->search( { cardnumber => $barcode} )->count() > 0) { - print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=".$barcode); + print $query->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$barcode&autoswitched=1"); } } @@ -669,6 +669,7 @@ $template->param( has_modifications => $has_modifications, override_high_holds => $override_high_holds, nopermission => scalar $query->param('nopermission'), + autoswitched => $query->param("autoswitched"), ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index cdfb908bd2..d47d7037e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -159,6 +159,10 @@ $(document).ready(function() { [% IF ( was_renewed ) %]
Patron's account has been renewed until [% expiry | $KohaDates %]
[% END %] +[% IF autoswitched %] +
Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.
+[% END %] + [% IF additional_materials %]
Note about the accompanying materials:
[% additional_materials %] -- 2.39.5