Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.js
index 572cd09..3e5a72b 100644 (file)
@@ -107,7 +107,7 @@ Pman.Dialog.CoreCompanies = {
                                         {
                                             xtype: 'TextField',
                                             xns: Roo.form,
-                                            allowBlank : false,
+                                            allowBlank : true,
                                             fieldLabel : 'Company ID (for filing Ref.)',
                                             name : 'code',
                                             qtip : "Enter code",
@@ -120,14 +120,10 @@ Pman.Dialog.CoreCompanies = {
                                                 render : function (_self)
                                                 {
                                                     _this.etypeCombo = _self;
-                                                },
-                                                select : function (combo, record, index)
-                                                {
-                                                    _this.grid.footer.onClick('first');
                                                 }
                                             },
                                             alwaysQuery : true,
-                                            displayField : 'name',
+                                            displayField : 'comptype_name',
                                             emptyText : "Select Type",
                                             fieldLabel : 'Type',
                                             forceSelection : true,
@@ -140,7 +136,7 @@ Pman.Dialog.CoreCompanies = {
                                             qtip : "Select type",
                                             queryParam : 'query[name]',
                                             selectOnFocus : true,
-                                            tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
+                                            tpl : '<div class="x-grid-cell-text x-btn button"><b>{comptype_name}</b> </div>',
                                             triggerAction : 'all',
                                             typeAhead : false,
                                             valueField : 'val',
@@ -169,7 +165,7 @@ Pman.Dialog.CoreCompanies = {
                                                     id : 'id',
                                                     root : 'data',
                                                     totalProperty : 'total',
-                                                    fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}]
+                                                    fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
                                                 }
                                             }
                                         },