LP#1197636 - Email record detail does not check for email user/dpearl/email_1197636
authorDan Pearl <dpearl@cwmars.org>
Fri, 2 Oct 2015 18:54:39 +0000 (14:54 -0400)
committerDan Pearl <dpearl@cwmars.org>
Tue, 20 Oct 2015 16:27:14 +0000 (12:27 -0400)
Even though no email was configured, the message shown when requesting bib information to be emailed
indicated success.  This misleading behavior has been addressed by alerting the patron of the situation
and providing a link to the page where the email address is defined, after which the action is automatically
retried.

The success message has also been altered slightly to provide confirmation of the generated email.

Signed-off-by: Dan Pearl <dpearl@cwmars.org>
Open-ILS/src/templates/opac/record/email.tt2

index d41226c..37e3cea 100644 (file)
@@ -8,7 +8,16 @@
     <div id="content-wrapper" class="content-wrapper-record-page">
         <div id='main-content'>
             <br/>
-            <h2 class='success'>[% l('Your email has been queued for Delivery.') %]</h2>
+            [% IF ctx.user.email %]
+            <h2 class='success'>[% l('Your email has been queued for delivery to ') %][% ctx.user.email %]</h2>
+            [% ELSE %]
+            <h2 class='error'>
+                [% l('Oops! You must set an email address for your account before I can send this information.  You can do that ') %]
+                <a href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">
+                        [% l("here") %]
+                </a>
+            </h2>
+            [% END %]
             <br/>
             <p>[ <a href="[% mkurl(ctx.opac_root  _ '/record/' _ ctx.bre_id) %]">[% l("Back to Record") %]</a> ]</p>
             <div class="common-full-pad"></div>