Pman.Dialog.XtupleTerms.bjs
[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" : 500,
15             "$ xns" : "Roo",
16             "closable" : false,
17             "resizable" : false,
18             "height" : 550,
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                             "items" : [
41                                 {
42                                     "fieldLabel" : "Code",
43                                     "xtype" : "TextField",
44                                     "allowBlank" : false,
45                                     "width" : 300,
46                                     "$ xns" : "Roo.form",
47                                     "name" : "terms_code"
48                                 },
49                                 {
50                                     "fieldLabel" : "Description",
51                                     "Number width" : 300,
52                                     "xtype" : "TextArea",
53                                     "$ xns" : "Roo.form",
54                                     "name" : "terms_descrip"
55                                 },
56                                 {
57                                     "fieldLabel" : "Due Days",
58                                     "Boolean allowDecimals" : true,
59                                     "xtype" : "NumberField",
60                                     "decimalPrecision" : 0,
61                                     "width" : 300,
62                                     "$ xns" : "Roo.form",
63                                     "name" : "terms_duedays"
64                                 },
65                                 {
66                                     "fieldLabel" : "Discount Day",
67                                     "Boolean allowDecimals" : true,
68                                     "xtype" : "NumberField",
69                                     "decimalPrecision" : 0,
70                                     "width" : 300,
71                                     "$ xns" : "Roo.form",
72                                     "name" : "terms_discdays"
73                                 },
74                                 {
75                                     "fieldLabel" : "Cut Off Day",
76                                     "xtype" : "NumberField",
77                                     "Boolean allowDecimals" : true,
78                                     "decimalPrecision" : 0,
79                                     "width" : 300,
80                                     "$ xns" : "Roo.form",
81                                     "name" : "terms_cutoffday"
82                                 },
83                                 {
84                                     "Boolean checked" : true,
85                                     "fieldLabel" : "Used in Payables",
86                                     "xtype" : "Checkbox",
87                                     "valueOff" : 0,
88                                     "$ xns" : "Roo.form",
89                                     "String inputValue" : true,
90                                     "name" : "terms_ap"
91                                 },
92                                 {
93                                     "Boolean checked" : true,
94                                     "fieldLabel" : "Used in Receivables",
95                                     "xtype" : "Checkbox",
96                                     "valueOff" : 0,
97                                     "$ xns" : "Roo.form",
98                                     "String inputValue" : true,
99                                     "name" : "terms_ar"
100                                 },
101                                 {
102                                     "xtype" : "Hidden",
103                                     "$ xns" : "Roo.form",
104                                     "Mixed value" : "D",
105                                     "name" : "terms_type"
106                                 },
107                                 {
108                                     "xtype" : "Hidden",
109                                     "$ xns" : "Roo.form",
110                                     "name" : "terms_id"
111                                 }
112                             ]
113                         }
114                     ]
115                 },
116                 {
117                     "listeners" : {
118                         "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
119                     },
120                     "text" : "Cancel",
121                     "xtype" : "Button",
122                     "$ xns" : "Roo",
123                     "* prop" : "buttons[]"
124                 },
125                 {
126                     "listeners" : {
127                         "click" : "function (_self, e)\n{\n    // do some checks?\n     \n    \n \n    _this.form.doAction(\"submit\");\n\n}"
128                     },
129                     "text" : "Save",
130                     "xtype" : "Button",
131                     "$ xns" : "Roo",
132                     "* prop" : "buttons[]"
133                 }
134             ]
135         }
136     ]
137 }