From cc3a129db81fe009a893c074757ec1df44096dea 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/circulation.pl' Signed-off-by: Owen Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- 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..4a4e50650a 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 == 1 %] + [% SET redirect = "circ/circulation" %] + [% ELSE %] + [% SET redirect = "members/moremember" %] + [% END %] + document.location.href="/cgi-bin/koha/[% redirect | $raw %].pl?borrowernumber="+borrowernumber; return false; } fnCallback(json); -- 2.39.5