Pman.Dialog.PersonEditor.bjs
[Pman.BAdmin] / Pman.Dialog.PersonEditor.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Dialog');
6
7 Pman.Dialog.PersonEditor= function() {}
8 Roo.apply(Pman.Dialog.PersonEditor.prototype, {
9
10  _strings : {
11   'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
12   'abb1d799e06329cb0c38276ea918300b' :"Secure passwords",
13   'bcc254b55c4a1babdf1dcb82c207506b' :"Phone",
14   '8a25a3ae30ab6e8ceb5b8c4009a3336f' :"Role / Position",
15   '5067d67ab0b0ab1e1099d1de30eccd82' :"Contac Name",
16   '315fce99b77b7f392bf68d5eb14f88c7' :"Password (type again to confirm)",
17   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
18   'ae3bb2a1ac61750150b606298091d38a' :"New Password",
19   '11dcfc58d8c9aed80d13d85369b854db' :"Person Editor",
20   'c9cc8cce247e49bae79f15173ce97354' :"Save",
21   '9810aa2b9f44401be4bf73188ef2b67d' :"Fax"
22  },
23
24  dialog : false,
25  callback:  false,
26
27  show : function(data, cb)
28  {
29   if (!this.dialog) {
30    this.create();
31   }
32
33   this.callback = cb;
34   this.data = data;
35   this.dialog.show(this.data._el);
36   if (this.form) {
37    this.form.reset();
38    this.form.setValues(data);
39    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
40   }
41
42  },
43
44  create : function()
45  {
46   var _this = this;
47   this.dialog = Roo.factory({
48     xtype : 'Modal',
49     title : _this._strings['11dcfc58d8c9aed80d13d85369b854db'] /* Person Editor */,
50     listeners : {
51      render : function (_self)
52       {
53           _this.modal = _self;
54       }
55     },
56     xns : Roo.bootstrap,
57     '|xns' : 'Roo.bootstrap',
58     buttons : [
59      {
60       xtype : 'Button',
61       html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
62       style : 'float: right; margin: 10px; width: 70px;',
63       weight : 'primary',
64       listeners : {
65        click : function (_self, e)
66         {
67             _this.dialog.hide();
68         }
69       },
70       xns : Roo.bootstrap,
71       '|xns' : 'Roo.bootstrap'
72      },
73      {
74       xtype : 'Button',
75       html : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
76       style : 'float: right; margin: 10px; width: 70px;',
77       weight : 'primary',
78       xns : Roo.bootstrap,
79       '|xns' : 'Roo.bootstrap'
80      }
81     ],
82     items  : [
83      {
84       xtype : 'Form',
85       listeners : {
86        render : function (_self)
87         {
88             _this.form = _self;
89         }
90       },
91       xns : Roo.bootstrap,
92       '|xns' : 'Roo.bootstrap',
93       items  : [
94        {
95         xtype : 'Row',
96         cls : 'col-md-12',
97         xns : Roo.bootstrap,
98         '|xns' : 'Roo.bootstrap',
99         items  : [
100          {
101           xtype : 'Container',
102           cls : 'col-md-12',
103           xns : Roo.bootstrap,
104           '|xns' : 'Roo.bootstrap',
105           items  : [
106            {
107             xtype : 'Input',
108             fieldLabel : _this._strings['5067d67ab0b0ab1e1099d1de30eccd82'] /* Contac Name */,
109             name : 'name',
110             listeners : {
111              render : function (_self)
112               {
113                   _this.userNmae = self;
114               }
115             },
116             xns : Roo.bootstrap,
117             '|xns' : 'Roo.bootstrap'
118            },
119            {
120             xtype : 'Input',
121             fieldLabel : _this._strings['8a25a3ae30ab6e8ceb5b8c4009a3336f'] /* Role / Position */,
122             name : 'role',
123             listeners : {
124              render : function (_self)
125               {
126                   _this.role = self;
127               }
128             },
129             xns : Roo.bootstrap,
130             '|xns' : 'Roo.bootstrap'
131            },
132            {
133             xtype : 'Input',
134             fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
135             name : 'phone',
136             listeners : {
137              render : function (_self)
138               {
139                   _this.phone = self;
140               }
141             },
142             xns : Roo.bootstrap,
143             '|xns' : 'Roo.bootstrap'
144            },
145            {
146             xtype : 'Input',
147             fieldLabel : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
148             name : 'fax',
149             listeners : {
150              render : function (_self)
151               {
152                   _this.fax = self;
153               }
154             },
155             xns : Roo.bootstrap,
156             '|xns' : 'Roo.bootstrap'
157            },
158            {
159             xtype : 'Input',
160             fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
161             name : 'email',
162             listeners : {
163              render : function (_self)
164               {
165                   _this.email = self;
166               }
167             },
168             xns : Roo.bootstrap,
169             '|xns' : 'Roo.bootstrap'
170            },
171            {
172             xtype : 'Input',
173             fieldLabel : _this._strings['ae3bb2a1ac61750150b606298091d38a'] /* New Password */,
174             inputType : 'password',
175             name : 'passwd1',
176             xns : Roo.bootstrap,
177             '|xns' : 'Roo.bootstrap'
178            },
179            {
180             xtype : 'Input',
181             fieldLabel : _this._strings['315fce99b77b7f392bf68d5eb14f88c7'] /* Password (type again to confirm) */,
182             inputType : 'password',
183             name : 'passwd2',
184             xns : Roo.bootstrap,
185             '|xns' : 'Roo.bootstrap'
186            },
187            {
188             xtype : 'Input',
189             checked : true,
190             fieldLabel : _this._strings['abb1d799e06329cb0c38276ea918300b'] /* Secure passwords */,
191             inputType : 'checkbox',
192             labelAlign : 'top',
193             listeners : '{\n                    check : function (_self, checked) {\n                        this.form.findField(\'passwd1\').insecure = false;\n\n                        if(!checked){\n                            this.form.findField(\'passwd1\').insecure = true;\n                        }\n                    }\n                }\n',
194             name : 'secure_password',
195             xns : Roo.bootstrap,
196             '|xns' : 'Roo.bootstrap'
197            }
198           ]
199          }
200         ]
201        }
202       ]
203      }
204     ]
205    }  );
206  }
207 });
208 Roo.apply(Pman.Dialog.PersonEditor, Pman.Dialog.PersonEditor.prototype);