Roo/form/BasicForm.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 10 Feb 2011 06:14:49 +0000 (14:14 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 10 Feb 2011 06:14:49 +0000 (14:14 +0800)
Roo/form/BasicForm.js

index bf13438..cc0dd62 100644 (file)
@@ -273,10 +273,20 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
             }
             Roo.callback(o.success, o.scope, [this, action]);
             this.fireEvent('actioncomplete', this, action);
+            
         }else{
             Roo.callback(o.failure, o.scope, [this, action]);
+            
+            if (!this.hasListener('actionfailed')) {
+               
+                Roo.MessageBox.alert("Error", "Saving Failed, please check your entries");
+            }
+            
             this.fireEvent('actionfailed', this, action);
         }
+        if (this.maskEl) {
+            this.maskEl.unmask();
+        }
     },
 
     /**