Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleTerms.bjs
1 {
2     "name" : "Pman.Dialog.XtupleTerms",
3     "parent" : "",
4     "title" : "",
5     "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleTerms.bjs",
6     "permname" : "",
7     "modOrder" : "001",
8     "items" : [
9         {
10             "modal" : true,
11             "collapsible" : false,
12             "title" : "Create / Edit Terms",
13             "xtype" : "LayoutDialog",
14             "width" : 550,
15             "$ xns" : "Roo",
16             "closable" : false,
17             "resizable" : false,
18             "height" : 300,
19             "items" : [
20                 {
21                     "xtype" : "LayoutRegion",
22                     "$ xns" : "Roo",
23                     "* prop" : "center"
24                 },
25                 {
26                     "region" : "center",
27                     "xtype" : "ContentPanel",
28                     "$ xns" : "Roo",
29                     "items" : [
30                         {
31                             "listeners" : {
32                                 "|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",
33                                 "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
34                             },
35                             "$ url" : "baseURL + '/Roo/terms.php'",
36                             "xtype" : "Form",
37                             "method" : "POST",
38                             "style" : "margin:10px;",
39                             "$ xns" : "Roo.form",
40                             "Number labelWidth" : 150,
41                             "items" : [
42                                 {
43                                     "fieldLabel" : "Code",
44                                     "xtype" : "TextField",
45                                     "allowBlank" : false,
46                                     "width" : 300,
47                                     "$ xns" : "Roo.form",
48                                     "name" : "terms_code"
49                                 },
50                                 {
51                                     "fieldLabel" : "Description",
52                                     "Number width" : 300,
53                                     "xtype" : "TextArea",
54                                     "$ xns" : "Roo.form",
55                                     "name" : "terms_descrip"
56                                 },
57                                 {
58                                     "Boolean allowBlank" : false,
59                                     "fieldLabel" : "Due Days",
60                                     "Boolean allowDecimals" : true,
61                                     "xtype" : "NumberField",
62                                     "decimalPrecision" : 0,
63                                     "width" : 300,
64                                     "$ xns" : "Roo.form",
65                                     "Mixed value" : 0,
66                                     "name" : "terms_duedays",
67                                     "Number minValue" : 0
68                                 },
69                                 {
70                                     "fieldLabel" : "Discount Day",
71                                     "Boolean allowDecimals" : true,
72                                     "xtype" : "NumberField",
73                                     "decimalPrecision" : 0,
74                                     "width" : 300,
75                                     "$ xns" : "Roo.form",
76                                     "Mixed value" : 0,
77                                     "name" : "terms_discdays",
78                                     "Number minValue" : 0
79                                 },
80                                 {
81                                     "fieldLabel" : "Cut Off Day",
82                                     "xtype" : "NumberField",
83                                     "Boolean allowDecimals" : true,
84                                     "decimalPrecision" : 0,
85                                     "width" : 300,
86                                     "$ xns" : "Roo.form",
87                                     "Mixed value" : 0,
88                                     "name" : "terms_cutoffday",
89                                     "Number minValue" : 0
90                                 },
91                                 {
92                                     "Boolean checked" : true,
93                                     "fieldLabel" : "Used in Payables",
94                                     "xtype" : "Checkbox",
95                                     "valueOff" : 0,
96                                     "$ xns" : "Roo.form",
97                                     "String inputValue" : true,
98                                     "name" : "terms_ap"
99                                 },
100                                 {
101                                     "Boolean checked" : true,
102                                     "fieldLabel" : "Used in Receivables",
103                                     "xtype" : "Checkbox",
104                                     "valueOff" : 0,
105                                     "$ xns" : "Roo.form",
106                                     "String inputValue" : true,
107                                     "name" : "terms_ar"
108                                 },
109                                 {
110                                     "xtype" : "Hidden",
111                                     "$ xns" : "Roo.form",
112                                     "name" : "terms_id"
113                                 }
114                             ]
115                         }
116                     ]
117                 },
118                 {
119                     "listeners" : {
120                         "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
121                     },
122                     "text" : "Cancel",
123                     "xtype" : "Button",
124                     "$ xns" : "Roo",
125                     "* prop" : "buttons[]"
126                 },
127                 {
128                     "listeners" : {
129                         "click" : "function (_self, e)\n{\n    // do some checks?\n     \n    \n \n    _this.form.doAction(\"submit\");\n\n}"
130                     },
131                     "text" : "Save",
132                     "xtype" : "Button",
133                     "$ xns" : "Roo",
134                     "* prop" : "buttons[]"
135                 }
136             ]
137         }
138     ]
139 }