[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 71195166989026f505d7332a85741c344f7b5ad5

Evergreen Git git at git.evergreen-ils.org
Wed Aug 22 14:03:53 EDT 2012


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, rel_2_3 has been updated
       via  71195166989026f505d7332a85741c344f7b5ad5 (commit)
      from  da90a9d224aa3cc5f6db79d46bab206b3d348257 (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 71195166989026f505d7332a85741c344f7b5ad5
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Fri Aug 17 16:20:35 2012 -0400

    TPac: Show email address when placing hold
    
    Both for staff and patron benefit.
    
    Also, we disable the checkbox if there is no email address on file.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
index ec979e3..730bc6f 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -75,8 +75,11 @@
             [% l('Notify when hold is ready for pickup?') %]
             <blockquote>
                 <input type="checkbox" name="email_notify" value="t"
-                    [% IF ctx.default_email_notify %]checked="checked"[% END %]/>
+                    [% IF !ctx.user.email %]disabled="true"[% ELSIF ctx.default_email_notify %]checked="checked"[% END %]/>
                     [% l('Yes, by Email') %]<br/>
+                <blockquote>
+                    [% l('Email Address:') %] <span name="email_address">[% ctx.user.email %]</span>
+                </blockquote>
                 <input type="checkbox" name="phone_notify_checkbox"
                     [% IF ctx.default_phone_notify %]checked="checked"[% END %]/>
                     [% l('Yes, by Phone') %]<br/>
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 989f07c..1cb52f3 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -62,6 +62,13 @@ function staff_hold_usr_barcode_changed(isload) {
         for(var i in update_elements) update_elements[i].value = load_info.settings['opac.default_sms_notify'];
         update_elements = document.getElementsByName('sms_carrier');
         for(var i in update_elements) update_elements[i].value = load_info.settings['opac.default_sms_carrier'];
+        update_elements = document.getElementsByName('email_notify');
+        for(var i in update_elements) {
+            update_elements[i].disabled = (load_info.user_email ? false : true);
+            if(update_elements[i].disabled) update_elements[i].checked = false;
+        }
+        update_elements = document.getElementsByName('email_address');
+        for(var i in update_elements) update_elements[i].textContent = load_info.user_email;
     }
 }
 window.onload = function() {
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
index c08bbe2..55a3682 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
@@ -2624,7 +2624,7 @@ commands:
         }
         if(!settings['opac.default_phone'] && user.day_phone()) settings['opac.default_phone'] = user.day_phone();
         if(!settings['opac.hold_notify'] && settings['opac.hold_notify'] !== '') settings['opac.hold_notify'] = 'email:phone';
-        return {"barcode": barcode, "settings" : settings};
+        return {"barcode": barcode, "settings" : settings, "user_email" : user.email()};
     },
 
     'sort_menu' : function(menu, recurse) {

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

Summary of changes:
 Open-ILS/src/templates/opac/parts/place_hold.tt2   |    5 ++++-
 Open-ILS/web/js/ui/default/opac/staff.js           |    7 +++++++
 .../xul/staff_client/chrome/content/main/menu.js   |    2 +-
 3 files changed, 12 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list