Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.bjs
index ead4599..b24f927 100644 (file)
@@ -53,7 +53,7 @@
                                     "|xns": "Roo.form",
                                     "items": [
                                         {
-                                            "allowBlank": false,
+                                            "allowBlank": true,
                                             "fieldLabel": "Company ID (for filing Ref.)",
                                             "name": "code",
                                             "qtip": "Enter code",
                                         },
                                         {
                                             "listeners": {
-                                                "render": "function (_self)\n{\n    _this.etypeCombo = _self;\n}",
-                                                "select": "function (combo, record, index)\n{\n    _this.grid.footer.onClick('first');\n}"
+                                                "render": "function (_self)\n{\n    _this.etypeCombo = _self;\n}"
                                             },
                                             "alwaysQuery": true,
-                                            "displayField": "name",
+                                            "displayField": "comptype_name",
                                             "emptyText": "Select Type",
                                             "fieldLabel": "Type",
                                             "forceSelection": true,
@@ -80,7 +79,7 @@
                                             "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",
                                                         },
                                                         {
                                                             "*prop": "reader",
-                                                            "xtype": "JsonReader",
-                                                            "|xns": "Roo.data",
                                                             "id": "id",
                                                             "root": "data",
                                                             "totalProperty": "total",
-                                                            "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]"
+                                                            "xtype": "JsonReader",
+                                                            "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
+                                                            "|xns": "Roo.data"
                                                         }
                                                     ]
                                                 }