From 0fc734340081a5f52a20306553219afefc50b067 Mon Sep 17 00:00:00 2001 From: senator Date: Tue, 10 May 2011 10:28:55 -0400 Subject: [PATCH] Better redirect from place_hold Before this, if you click place hold on something while not logged in, you are redirected to the login page, which is good, and redirected thence to the place hold page, which is good. But after actually placing the hold you got redirected to the login page again, which is not good. Now you get sent back to the home page. This may not be the ideal choice. myopac/main may make more sense. Also, there is still not any clear visual feedback for the user that their hold placement succeeded. That'll need to be addressed too. --- .../templates/default/opac/parts/place_hold.tt2 | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 index fc4dce0..8f56aa5 100644 --- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 @@ -58,8 +58,16 @@ value="[% CGI.param('hold_target') | html %]" /> + [% + new_redirect_to = ctx.referer; + IF new_redirect_to.match('redirect_to'); + new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home'; + ELSE; + new_redirect_to = new_redirect_to | replace('^http:', 'https:'); + END; + %] + value="[% new_redirect_to | html %]" />

Place Hold

[% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %] -- 1.7.2.5