{ "name" : "Pman.Dialog.XtupleTerms", "parent" : "", "title" : "", "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleTerms.bjs", "permname" : "", "modOrder" : "001", "items" : [ { "modal" : true, "collapsible" : false, "title" : "Create / Edit Terms", "xtype" : "LayoutDialog", "width" : 550, "$ xns" : "Roo", "closable" : false, "resizable" : false, "height" : 300, "items" : [ { "xtype" : "LayoutRegion", "$ xns" : "Roo", "* prop" : "center" }, { "region" : "center", "xtype" : "ContentPanel", "$ xns" : "Roo", "items" : [ { "listeners" : { "|actioncomplete" : "function(_self,action)\n{\n if (action.type == 'setdata') {\n if (_this.data.id) { \n this.load({ method: 'GET', params: { _id : _this.data.id}});\n return;\n }\n \n return;\n }\n if (action.type == 'load') {\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n \n _this.form.reset();\n return;\n }\n}\n", "|rendered" : "function (form)\n{\n _this.form= form;\n}\n" }, "$ url" : "baseURL + '/Roo/terms.php'", "xtype" : "Form", "method" : "POST", "style" : "margin:10px;", "$ xns" : "Roo.form", "Number labelWidth" : 150, "items" : [ { "fieldLabel" : "Code", "xtype" : "TextField", "allowBlank" : false, "width" : 300, "$ xns" : "Roo.form", "name" : "terms_code" }, { "fieldLabel" : "Description", "Number width" : 300, "xtype" : "TextArea", "$ xns" : "Roo.form", "name" : "terms_descrip" }, { "Boolean allowBlank" : false, "fieldLabel" : "Due Days", "Boolean allowDecimals" : true, "xtype" : "NumberField", "decimalPrecision" : 0, "width" : 300, "$ xns" : "Roo.form", "Mixed value" : 0, "name" : "terms_duedays", "Number minValue" : 0 }, { "fieldLabel" : "Discount Day", "Boolean allowDecimals" : true, "xtype" : "NumberField", "decimalPrecision" : 0, "width" : 300, "$ xns" : "Roo.form", "Mixed value" : 0, "name" : "terms_discdays", "Number minValue" : 0 }, { "fieldLabel" : "Cut Off Day", "xtype" : "NumberField", "Boolean allowDecimals" : true, "decimalPrecision" : 0, "width" : 300, "$ xns" : "Roo.form", "Mixed value" : 0, "name" : "terms_cutoffday", "Number minValue" : 0 }, { "Boolean checked" : true, "fieldLabel" : "Used in Payables", "xtype" : "Checkbox", "valueOff" : 0, "$ xns" : "Roo.form", "String inputValue" : true, "name" : "terms_ap" }, { "Boolean checked" : true, "fieldLabel" : "Used in Receivables", "xtype" : "Checkbox", "valueOff" : 0, "$ xns" : "Roo.form", "String inputValue" : true, "name" : "terms_ar" }, { "xtype" : "Hidden", "$ xns" : "Roo.form", "name" : "terms_id" } ] } ] }, { "listeners" : { "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}" }, "text" : "Cancel", "xtype" : "Button", "$ xns" : "Roo", "* prop" : "buttons[]" }, { "listeners" : { "click" : "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction(\"submit\");\n\n}" }, "text" : "Save", "xtype" : "Button", "$ xns" : "Roo", "* prop" : "buttons[]" } ] } ] }