Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.js
index 35215cd..d12a2da 100644 (file)
@@ -37,7 +37,7 @@ Pman.Dialog.CoreCompanies = {
             height : 400,
             modal : true,
             shadow : 'true',
-            title : "Edit Company",
+            title : "Add / Edit Organization",
             width : 750,
             items : [
                 {
@@ -68,7 +68,7 @@ Pman.Dialog.CoreCompanies = {
                                    
                                     if (act.type == 'load') {
                                         _this.data = act.result.data;
-                                        var meth = _this.data.isOwner || !Pman.Login.isOwner() ? 'disable' : 'enable';
+                                        var meth = _this.data.comptype == 'OWNER' ? 'disable' : 'enable';
                                      
                                             
                                         if (_this.form.findField('comptype')) {
@@ -127,7 +127,7 @@ Pman.Dialog.CoreCompanies = {
                                             emptyText : "Select Type",
                                             fieldLabel : 'Type',
                                             forceSelection : true,
-                                            hiddenName : 'comptype',
+                                            hiddenName : 'comptype_id',
                                             listWidth : 250,
                                             loadingText : "Searching...",
                                             minChars : 2,
@@ -282,11 +282,6 @@ Pman.Dialog.CoreCompanies = {
                                         }
                                     ]
                                 },
-                                {
-                                    xtype: 'Hidden',
-                                    xns: Roo.form,
-                                    name : 'isOwner'
-                                },
                                 {
                                     xtype: 'Hidden',
                                     xns: Roo.form,