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 <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2021-11-04 06:50:46 +00:00 committed by Jonathan Druart
parent 9bf0672360
commit cc3a129db8
1 changed files with 6 additions and 1 deletions

View File

@ -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);