LP1271218 - clarify how opt-in user notifications are shown in my account
authorBen Shum <bshum@biblio.org>
Tue, 21 Jan 2014 18:52:49 +0000 (13:52 -0500)
committerBen Shum <bshum@biblio.org>
Thu, 6 Feb 2014 03:42:04 +0000 (22:42 -0500)
As reported in LP127128, end users may not need to be shown the message that
"No notification preferences are configured" when in fact this message is only
displayed when the user opt-in notification settings are not configured.

So, alter this to only show the table and div when there are settings to be
configured and otherwise show nothing.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/myopac/prefs_notify.tt2

index 0663d86..46bce63 100644 (file)
         </tbody>
     </table>
 
+    [% IF ctx.opt_in_settings.size > 0 %]
     <div class='user_opt_in_settings'>
-    [% IF ctx.opt_in_settings.size == 0 %]
-      <strong>[% l('No notification preferences are configured') %]</strong>
-    [% ELSE %]
       <table>
         <thead><tr>
             <th>[% l('Notification Type') %]</th>
             [% END %]
         </tbody>
       </table>
-    [% END %]
     </div>
+    [% END %]
     <input type='submit' value="[% l('Save') %]" alt="[% l('Save') %]" class="opac-button" />
 </form>
 [% END %]