disabling hold notify checkbox when user has no email and showing message pointing...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Mar 2007 22:12:31 +0000 (22:12 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Mar 2007 22:12:31 +0000 (22:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7034 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/holds.js
Open-ILS/web/opac/skin/default/xml/common/holds.xml

index 41f71b2..1bd6ca6 100644 (file)
@@ -8,6 +8,8 @@ item_form and language are optional - if language exist and no
 item_form is specified, use item_type(s)--language
 */
 
+var noEmailMessage;
+
 function holdsHandleStaff() {
        swapCanvas($('xulholds_box'));
        $('xul_recipient_barcode').focus();
@@ -52,6 +54,9 @@ function holdsDrawEditor(args) {
 
        holdArgs = (args) ? args : holdArgs;
 
+    if(!noEmailMessage)
+        noEmailMessage = $('holds_email').removeChild($('holds.no_email'));
+
        if(isXUL() && holdArgs.recipient == null 
                        && holdArgs.editHold == null) {
                holdsHandleStaff();
@@ -402,8 +407,14 @@ function __holdsDrawWindow() {
                }
        }
 
-    if(!G.user.email())
+    if(!G.user.email()) {
                $('holds_enable_email').checked = false;        
+               $('holds_enable_email').disabled = true;
+        var n = noEmailMessage.cloneNode(true);
+           appendClear( $('holds_email'), n);
+        unHideMe(n);
+        $('holds.no_email.my_account').setAttribute('href', buildOPACLink({page:MYOPAC},null,true));
+    }
 
        if(!$('holds_phone').value) 
                $('holds_enable_phone').checked = false;        
index 31ba993..b605871 100644 (file)
 
                                <tr>
                                        <td class='holds_cell'>&opac.holds.concactEmail;:</td>
-                                       <td class='holds_cell' id='holds_email'> </td>
+                                       <td class='holds_cell' id='holds_email'> 
+                        <span class='hide_me' id='holds.no_email'>
+                            (See <a class='classic_link' id='holds.no_email.my_account'>My Account</a> for setting your email address)
+                        </span>
+                    </td>
                                </tr>
                                <tr>
                                        <td class='holds_cell'>Enable email notifications for this hold?</td>