Pman.Dialog.CoreCompanies.bjs
authoredward <edward@roojs.com>
Fri, 4 Nov 2016 05:48:40 +0000 (13:48 +0800)
committeredward <edward@roojs.com>
Fri, 4 Nov 2016 05:48:40 +0000 (13:48 +0800)
Pman.Dialog.CoreCompanies.js

Pman.Dialog.CoreCompanies.bjs
Pman.Dialog.CoreCompanies.js

index 4e6da40..309ed93 100644 (file)
     },
     {
      "listeners" : {
-      "click" : "function (_self, e)\n{\n    // do some checks?\n    \n    if(!_this.form.isValid()){\n    \n    }\n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
+      "click" : "function (_self, e)\n{\n    // do some checks?\n    \n    if(!_this.form.isValid()){\n        Roo.MessageBox.alert('Error', 'Please Correct all the errors in red');\n        return;\n    }\n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
      },
      "text" : "Save",
      "xtype" : "Button",
index fd85277..ddbadbb 100644 (file)
@@ -103,7 +103,8 @@ Pman.Dialog.CoreCompanies = {
             // do some checks?
             
             if(!_this.form.isValid()){
-            
+                Roo.MessageBox.alert('Error', 'Please Correct all the errors in red');
+                return;
             }
             
             _this.dialog.el.mask("Saving");