DataObjects/Core_email.php
[Pman.Core] / Pman.Dialog.CoreCompanies.js
index 949437f..3f6f3e5 100644 (file)
@@ -118,7 +118,18 @@ Pman.Dialog.CoreCompanies = {
                     _this.form.doAction("submit");
                 },
                 failure : function(res) {
-                    Roo.log(res);
+                    Roo.MessageBox.confirm(
+                        "Confirm", 
+                        "The company name has been used. Save it anyway?", 
+                        function(res) {
+                            if(res != 'yes') {
+                                return;
+                            }
+                            
+                            _this.dialog.el.mask("Saving");
+                            _this.form.doAction("submit");
+                        }
+                    );
                 }
             });
             
@@ -143,7 +154,7 @@ Pman.Dialog.CoreCompanies = {
         xtype : 'Form',
         fileUpload : true,
         labelWidth : 160,
-        url : baseURL + '/Roo/Companies.php',
+        url : baseURL + '/Roo/core_company.php',
         listeners : {
          actioncomplete : function(f, act) {
               _this.dialog.el.unmask();
@@ -388,7 +399,7 @@ Pman.Dialog.CoreCompanies = {
                                        
                   Pman.Dialog.Image.show({
                       onid :_this.data.id,
-                      ontable : 'Companies',
+                      ontable : 'core_company',
                       imgtype : 'LOGO'
                   }, function(data) {
                       if  (data) {