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" : 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                                     "fieldLabel" : "Due Days",
59                                     "Boolean allowDecimals" : true,
60                                     "xtype" : "NumberField",
61                                     "decimalPrecision" : 0,
62                                     "width" : 300,
63                                     "$ xns" : "Roo.form",
64                                     "name" : "terms_duedays"
65                                 },
66                                 {
67                                     "fieldLabel" : "Discount Day",
68                                     "Boolean allowDecimals" : true,
69                                     "xtype" : "NumberField",
70                                     "decimalPrecision" : 0,
71                                     "width" : 300,
72                                     "$ xns" : "Roo.form",
73                                     "name" : "terms_discdays"
74                                 },
75                                 {
76                                     "fieldLabel" : "Cut Off Day",
77                                     "xtype" : "NumberField",
78                                     "Boolean allowDecimals" : true,
79                                     "decimalPrecision" : 0,
80                                     "width" : 300,
81                                     "$ xns" : "Roo.form",
82                                     "name" : "terms_cutoffday"
83                                 },
84                                 {
85                                     "Boolean checked" : true,
86                                     "fieldLabel" : "Used in Payables",
87                                     "xtype" : "Checkbox",
88                                     "valueOff" : 0,
89                                     "$ xns" : "Roo.form",
90                                     "String inputValue" : true,
91                                     "name" : "terms_ap"
92                                 },
93                                 {
94                                     "Boolean checked" : true,
95                                     "fieldLabel" : "Used in Receivables",
96                                     "xtype" : "Checkbox",
97                                     "valueOff" : 0,
98                                     "$ xns" : "Roo.form",
99                                     "String inputValue" : true,
100                                     "name" : "terms_ar"
101                                 },
102                                 {
103                                     "xtype" : "Hidden",
104                                     "$ xns" : "Roo.form",
105                                     "Mixed value" : "D",
106                                     "name" : "terms_type"
107                                 },
108                                 {
109                                     "xtype" : "Hidden",
110                                     "$ xns" : "Roo.form",
111                                     "name" : "terms_id"
112                                 }
113                             ]
114                         }
115                     ]
116                 },
117                 {
118                     "listeners" : {
119                         "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
120                     },
121                     "text" : "Cancel",
122                     "xtype" : "Button",
123                     "$ xns" : "Roo",
124                     "* prop" : "buttons[]"
125                 },
126                 {
127                     "listeners" : {
128                         "click" : "function (_self, e)\n{\n    // do some checks?\n     \n    \n \n    _this.form.doAction(\"submit\");\n\n}"
129                     },
130                     "text" : "Save",
131                     "xtype" : "Button",
132                     "$ xns" : "Roo",
133                     "* prop" : "buttons[]"
134                 }
135             ]
136         }
137     ]
138 }