[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5a7aaa6e832342b99eadca6c73ef7fc8c9d48867

Evergreen Git git at git.evergreen-ils.org
Wed Mar 13 18:20:00 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  5a7aaa6e832342b99eadca6c73ef7fc8c9d48867 (commit)
      from  408a4e4106b62c328c3b558d536810bd0c9b12f8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5a7aaa6e832342b99eadca6c73ef7fc8c9d48867
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Aug 1 11:12:36 2012 -0400

    TPAC: Add config options to hide phone / user prefs
    
    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 at laurentian.ca>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/templates/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/opac/myopac/prefs.tt2
index 38b78b4..8e45561 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs.tt2
@@ -84,21 +84,29 @@
                     </div>[% l("Username") %]
                 </td>
                 <td class='light_border'>[% ctx.user.usrname | html %]</td>
-                [% IF ctx.username_change_disallowed %]
+                [%- IF ctx.username_change_disallowed %]
                 <td></td>
-                [% ELSE %]
+                [%- ELSE %]
                 <td class='light_border'><a href='update_username'>[% l("Change") %]</a></td>
-                [% END %]
+                [%- END %]
             </tr>
             <tr>
                 <td class='color_4 light_border'>[% l("Password") %]</td>
                 <td class='light_border'>[% l("(not shown)") %]</td>
+                [%- IF disable_password_change == 'true' %]
+                <td></td>
+                [%- ELSE %]
                 <td class='light_border'><a href='update_password'>[% l("Change") %]</a></td>
+                [%- END %]
             </tr>
             <tr>
                 <td class='color_4 light_border'>[% l("Email Address") %]</td>
                 <td class='light_border'>[% ctx.user.email | html %]</td>
+                [%- IF disable_email_change == 'true' %]
+                <td></td>
+                [%- ELSE %]
                 <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
+                [%- END %]
             </tr>
 
             [% IF ctx.user.ident_value %]<tr class="hide_me">
diff --git a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
index 57eed22..cf7309a 100644
--- a/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
+++ b/Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
@@ -27,6 +27,7 @@
                         [% IF (matches = ctx.user_setting_map.$setting.match('email')); %] checked='checked' [% END %]/>
                 </td>
             </tr>
+            [%- IF allow_phone_notifications == 'true' %]
             <tr>
                 <td>[% l('Notify by Phone by default when a hold is ready for pickup?') %]</td>
                 <td>
@@ -43,6 +44,7 @@
                         [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
                 </td>
             </tr>
+            [%- END %]
             [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %]
             <tr>
                 <td>[% l('Notify by Text by default when a hold is ready for pickup?') %]</td>
diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2
index e334975..c8e87ef 100644
--- a/Open-ILS/src/templates/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/opac/parts/config.tt2
@@ -56,6 +56,22 @@ google_analytics.code = 'UA-9999999-99';
 reset_password = 'true';
 
 ##############################################################################
+# Hide various options from user preferences that you might not want to expose
+# if you rely on centralized authentication via open-ils.auth_proxy, like LDAP
+#
+# Username changes can be disabled by the opac.lock_usernames OU setting.
+##############################################################################
+disable_password_change = 'false';
+disable_email_change = 'false';
+
+##############################################################################
+# Some libraries do not do notifications by phone; if not true, then this
+# hides the user preference for phone notifications as well as the phone
+# notification portion of the hold dialogue
+##############################################################################
+allow_phone_notifications = 'true';
+
+##############################################################################
 # Misc. UI Settings
 ##############################################################################
 
diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
index edbaa42..31892fd 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -80,6 +80,7 @@
                 <blockquote>
                     [% l('Email Address:') %] <span name="email_address">[% ctx.user.email %]</span>
                 </blockquote>
+                [%- 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/>
@@ -88,6 +89,7 @@
                     IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]'
                     [%- ELSIF ctx.user.day_phone; %] value='[% ctx.user.day_phone | html %]' [% END %]/>
                 </blockquote>
+                [%- END -%]
                 [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %]
                 <input type="checkbox" name="sms_notify_checkbox"
                     [% IF ctx.default_sms_notify %]checked="checked"[% END %]/>

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/opac/myopac/prefs.tt2       |   14 +++++++++++---
 .../src/templates/opac/myopac/prefs_notify.tt2     |    2 ++
 Open-ILS/src/templates/opac/parts/config.tt2       |   16 ++++++++++++++++
 Open-ILS/src/templates/opac/parts/place_hold.tt2   |    2 ++
 4 files changed, 31 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list