"Return to record" after submission of phone number on SMS page fixed
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 2 May 2013 19:00:31 +0000 (15:00 -0400)
committerJason Etheridge <jason@esilibrary.com>
Thu, 6 Jun 2013 21:19:51 +0000 (17:19 -0400)
Before this, it only worked on the page load *before* form submission.
There's probably a more elegant solution that doesn't involve keeping
track of URIs, but this seems to me to work.

Problem relayed to me by Dale Rigney at Equinox, who helped reproduce
the issue and test a fix.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/SMS.pm

index bdaaddb..63c0503 100644 (file)
@@ -28,7 +28,7 @@ sub load_sms_cn {
     $ctx->{sms_notify} = $cgi->param('sms_notify');
     $ctx->{copy_id} = $cgi->param('copy_id');
     $ctx->{query} = $cgi->param('query');
-    $ctx->{origin} = $cgi->param('origin');
+    $ctx->{origin} = $cgi->param('origin') || $cgi->referer;
 
     my $acn_results = $e->json_query({
         select => {