From e1c1d320055a32d98ffcef1345ec6e99e801d15e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 4 Nov 2021 06:50:46 +0000 Subject: [PATCH] Bug 29411: Redirect to circulation if circsearch is true TO test: 1 - Have a patron with a unique surname i.e. Acosta 2 - Enter the surename into 'Search patrons' box on staff homepage 3 - You are redirected to 'members/moremember.pl' 4 - Enter the surname into 'Check out' box at top of page 5 - You are redirected to 'members/moremember.pl' 6 - Apply patch 7 - Enter the surename into 'Search patrons' box on staff homepage 8 - You are redirected to 'members/moremember.pl' 9 - Enter the surname into 'Check out' box at top of page 10 - You are redirected to 'circ/circulationr.pl' --- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index f1a6669e6f..9a2361c3e7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -444,7 +444,12 @@ var borrowernumber = json.aaData[0].borrowernumber; /* Overwrite history state of firstletter search since only one result was returned; This prevents a loop upon clicking back */ history.replaceState( {}, null, window.location.href.split("?" )[0]); - document.location.href="/cgi-bin/koha/members/moremember.pl?borrowernumber="+borrowernumber; + [% IF circsearch == 0 %] + [% SET redirect = "members/moremember" %] + [% ELSE %] + [% SET redirect = "circ/circulation" %] + [% END %] + document.location.href="/cgi-bin/koha/[% redirect | $raw %].pl?borrowernumber="+borrowernumber; return false; } fnCallback(json); -- 2.20.1