fixed bug which caused the user editor to alert errors
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 25 Oct 2006 20:36:56 +0000 (20:36 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 25 Oct 2006 20:36:56 +0000 (20:36 +0000)
on deleted addresses if the address data was invalid

git-svn-id: svn://svn.open-ils.org/ILS/trunk@6511 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/xul/staff_client/server/patron/ue.js
Evergreen/xul/staff_client/server/patron/ue_config.js

index 610f6ad..e9e30b6 100644 (file)
@@ -366,6 +366,7 @@ function uEditCheckValid(field) {
                        removeCSSClass(field.widget.node, CSS_INVALID_DATA);
                }
        }
+
 }
 
 /* find a field object by object key */
@@ -400,9 +401,11 @@ function uEditGetErrorStrings() {
        uEditIterateFields(
                function(field) { 
                        if(field.errkey) {
-                               if( field.widget.node.className.indexOf(CSS_INVALID_DATA) != -1) {
-                                       var str = $(field.errkey).innerHTML;
-                                       if(str) errors.push(str);
+                               if( !field.object.isdeleted() ) {
+                                       if( field.widget.node.className.indexOf(CSS_INVALID_DATA) != -1) {
+                                               var str = $(field.errkey).innerHTML;
+                                               if(str) errors.push(str);
+                                       }
                                }
                        }
                }
index a071339..1d6a3cc 100644 (file)
@@ -637,7 +637,10 @@ function uEditBuildAddrFields(patron, address) {
        uEditCheckSharedAddr(patron, address, tbody, row);
 
        $n(row, 'ue_addr_delete').onclick = 
-               function() { uEditDeleteAddr(tbody, row, address); }
+               function() { 
+                       uEditDeleteAddr(tbody, row, address); 
+                       uEditCheckErrors();
+               };
 
        if( patron.billing_address() &&
                        address.id() == patron.billing_address().id() )