From 72e78393c1f92281302b3fdaa169960a97e98903 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Wed, 10 Jun 2015 15:44:46 -0400 Subject: [PATCH] LP#1396263: Fix for 'Return to Record' link breaks after texting If user is already logged into OPAC when texting a call number from the record screen, the 'Return to Record' link works properly. However, if user is not logged in and is prompted to log in first, the 'Return to Record' link actually returns the user to 'My Account.' This patch corrects that problem and returns the user to the record regardless of whether they were initially logged in or not. Signed-off-by: Terran McCanna Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/parts/record/copy_table.tt2 | 4 +++- Open-ILS/src/templates/opac/sms_cn.tt2 | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index eeb8643148..c87c27e595 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -98,7 +98,9 @@ END; # FOREACH bib [% END %] - [% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](Text)[% END %] + [% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') + OR ctx.aou_tree.id, 'sms.enable') == 1 %](Text)[% END %] [%- IF has_parts == 'true' %] [% copy_info.part_label | html %] [%- END %] diff --git a/Open-ILS/src/templates/opac/sms_cn.tt2 b/Open-ILS/src/templates/opac/sms_cn.tt2 index 4a7422c216..7c958d1939 100644 --- a/Open-ILS/src/templates/opac/sms_cn.tt2 +++ b/Open-ILS/src/templates/opac/sms_cn.tt2 @@ -13,6 +13,12 @@

[% IF ctx.event != -1 %]
+ + [% IF ctx.origin.search('redirect'); + SET ctx.origin = ctx.opac_root _ '/record/' _ CGI.url_param('rec') _ '?query=' _ + CGI.url_param('query') _ ';qtype=' _ CGI.url_param('qtype') _ ';locg=' _ CGI.url_param('locg'); + END %] + [% IF ctx.sms_notify %]

[% l('Your message has been sent!') %]

[% l('Return to record') %] -- 2.43.2