TPAC: Add config options to hide phone / user prefs
authorDan Scott <dscott@laurentian.ca>
Wed, 1 Aug 2012 15:12:36 +0000 (11:12 -0400)
committerDan Scott <dscott@laurentian.ca>
Wed, 1 Aug 2012 16:30:46 +0000 (12:30 -0400)
Libraries using centralized authentication (such as LDAP via
open-ils.auth_proxy) will not want to allow users to change their
passwords or email addresses.

In addition, many libraries do not want to deal with phone
notifications.

This commit adds preferences to config.tt2 that hide these options from
the user.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Conflicts:
Open-ILS/src/templates/opac/myopac/prefs.tt2
Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
Open-ILS/src/templates/opac/parts/place_hold.tt2

Open-ILS/src/templates/opac/myopac/prefs.tt2
Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
Open-ILS/src/templates/opac/parts/place_hold.tt2

index 4b5c476..85572f4 100644 (file)
@@ -93,7 +93,7 @@
             <tr>
                 <td class='color_4 light_border'>[% l("Password") %]</td>
                 <td class='light_border'>[% l("(not shown)") %]</td>
-                [%- IF disable_password_change %]
+                [%- IF disable_password_change == 'true' %]
                 <td></td>
                 [%- ELSE %]
                 <td class='light_border'><a href='update_password'>[% l("Change") %]</a></td>
             <tr>
                 <td class='color_4 light_border'>[% l("Email Address") %]</td>
                 <td class='light_border'>[% ctx.user.email | html %]</td>
-                [%- IF disable_email_change %]
+                [%- IF disable_email_change == 'true' %]
                 <td></td>
                 [%- ELSE %]
                 <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
index 22d9aff..d5bc545 100644 (file)
@@ -27,7 +27,7 @@
                         [% IF (matches = ctx.user_setting_map.$setting.match('email')); %] checked='checked' [% END %]/>
                 </td>
             </tr>
-            [%- IF allow_phone_notifications %]
+            [%- IF allow_phone_notifications == 'true' %]
             <tr>
                 <td>[% l('Notify by Phone by default when a hold is ready for pickup?') %]</td>
                 <td>
index eefeda1..16a18c1 100644 (file)
@@ -77,7 +77,7 @@
                 <input type="checkbox" name="email_notify" value="t"
                     [% IF ctx.default_email_notify %]checked="checked"[% END %]/>
                     [% l('Yes, by Email') %]<br/>
-                [%- IF allow_phone_notifications %]
+                [%- IF allow_phone_notifications == 'true' %]
                 <input type="checkbox" name="phone_notify_checkbox"
                     [% IF ctx.default_phone_notify %]checked="checked"[% END %]/>
                     [% l('Yes, by Phone') %]<br/>