Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.bjs
index e53d5b2..76534ab 100644 (file)
     },
     {
      "listeners" : {
-      "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    \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    new Pman.Request({\n        url : baseURL + '/Roo/Core_enum.php',\n        method : 'POST',\n        params : {\n          id : record.data.id,\n          etype : _this.data.etype,\n          name :  record.data.name,\n          active : record.data.active,\n          seqid : record.data.seqid,\n          display_name : record.data.display_name\n        }, \n        success : function(res) {\n          //Roo.log(data);\n          // update the ID if it's not set..\n          if (record.data.id * 1 < 1) {\n              record.set('id', res.data.id);\n          }\n        }\n    });\n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
      },
      "text" : "Save",
      "xtype" : "Button",