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                             "method" : "POST",
37                             "xtype" : "Form",
38                             "style" : "margin:10px;",
39                             "$ xns" : "Roo.form",
40                             "items" : [
41                                 {
42                                     "style" : "width:420px",
43                                     "xtype" : "FieldSet",
44                                     "legend" : "Details",
45                                     "$ xns" : "Roo.form",
46                                     "items" : [
47                                         {
48                                             "fieldLabel" : "First Name",
49                                             "xtype" : "TextField",
50                                             "allowBlank" : false,
51                                             "width" : 300,
52                                             "$ xns" : "Roo.form",
53                                             "name" : "cntct_first_name"
54                                         },
55                                         {
56                                             "fieldLabel" : "Last Name",
57                                             "xtype" : "TextField",
58                                             "width" : 300,
59                                             "$ xns" : "Roo.form",
60                                             "name" : "cntct_last_name"
61                                         },
62                                         {
63                                             "fieldLabel" : "Phone",
64                                             "xtype" : "TextField",
65                                             "$ regex" : "/^[0-9 +-]+$/",
66                                             "width" : 300,
67                                             "$ xns" : "Roo.form",
68                                             "name" : "cntct_phone"
69                                         },
70                                         {
71                                             "fieldLabel" : "Alt",
72                                             "xtype" : "TextField",
73                                             "$ regex" : "/^[0-9 +-]+$/",
74                                             "width" : 300,
75                                             "$ xns" : "Roo.form",
76                                             "name" : "cntct_phone2"
77                                         },
78                                         {
79                                             "Boolean allowBlank" : false,
80                                             "fieldLabel" : "Email",
81                                             "vtype" : "email",
82                                             "xtype" : "TextField",
83                                             "width" : 300,
84                                             "$ xns" : "Roo.form",
85                                             "name" : "cntct_email"
86                                         },
87                                         {
88                                             "fieldLabel" : "Password",
89                                             "xtype" : "TextField",
90                                             "String inputType" : "password",
91                                             "width" : 300,
92                                             "$ xns" : "Roo.form",
93                                             "name" : "password"
94                                         },
95                                         {
96                                             "fieldLabel" : "Confirm PW",
97                                             "xtype" : "TextField",
98                                             "String inputType" : "password",
99                                             "width" : 300,
100                                             "$ xns" : "Roo.form",
101                                             "name" : "password2"
102                                         },
103                                         {
104                                             "Boolean checked" : true,
105                                             "fieldLabel" : "Active",
106                                             "xtype" : "Checkbox",
107                                             "valueOff" : 0,
108                                             "$ xns" : "Roo.form",
109                                             "String inputValue" : true,
110                                             "name" : "cntct_active"
111                                         }
112                                     ]
113                                 },
114                                 {
115                                     "fieldLabel" : "Code",
116                                     "xtype" : "TextField",
117                                     "allowBlank" : false,
118                                     "width" : 300,
119                                     "$ xns" : "Roo.form",
120                                     "name" : "terms_code"
121                                 },
122                                 {
123                                     "xtype" : "Hidden",
124                                     "Mixed value" : "D",
125                                     "$ xns" : "Roo.form",
126                                     "name" : "terms_type"
127                                 },
128                                 {
129                                     "xtype" : "Hidden",
130                                     "$ xns" : "Roo.form",
131                                     "name" : "terms_id"
132                                 }
133                             ]
134                         }
135                     ]
136                 },
137                 {
138                     "listeners" : {
139                         "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
140                     },
141                     "text" : "Cancel",
142                     "xtype" : "Button",
143                     "$ xns" : "Roo",
144                     "* prop" : "buttons[]"
145                 },
146                 {
147                     "listeners" : {
148                         "click" : "function (_self, e)\n{\n    // do some checks?\n     \n    \n \n    _this.form.doAction(\"submit\");\n\n}"
149                     },
150                     "text" : "Save",
151                     "xtype" : "Button",
152                     "$ xns" : "Roo",
153                     "* prop" : "buttons[]"
154                 }
155             ]
156         }
157     ]
158 }