sync
[Pman.Admin] / Pman.Dialog.AdminBulkPassword.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.AdminBulkPassword = {
8
9  _strings : {
10   '6dac324294c8f0378abea84fa382b60c' :"email and new password separeted by a space <br/>(note you can not change your password this way)",
11   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
12   'e47ca954fb02edc53af1507ac17d12a0' :"Bulk Change Passwords",
13   'e0aa021e21dddbd6d8cecec71e9cf564' :"OK"
14  },
15  _named_strings : {
16   '_bulk_update_passwords_fieldLabel' : '6dac324294c8f0378abea84fa382b60c' /* email and new password separeted by a space <br/>(note you can not change your password this way) */ 
17  },
18
19  dialog : false,
20  callback:  false,
21
22  show : function(data, cb)
23  {
24   if (!this.dialog) {
25    this.create();
26   }
27
28   this.callback = cb;
29   this.data = data;
30   this.dialog.show.apply(this.dialog,  Array.prototype.slice.call(arguments).slice(2));
31   if (this.form) {
32    this.form.reset();
33    this.form.setValues(data);
34    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
35   }
36
37  },
38
39  create : function()
40  {
41    var _this = this;
42    this.dialog = Roo.factory({
43     xtype : 'LayoutDialog',
44     closable : false,
45     height : 420,
46     modal : true,
47     resizable : false,
48     title : _this._strings['e47ca954fb02edc53af1507ac17d12a0'] /* Bulk Change Passwords */,
49     width : 500,
50     xns : Roo,
51     '|xns' : 'Roo',
52     center : {
53      xtype : 'LayoutRegion',
54      xns : Roo,
55      '|xns' : 'Roo'
56     },
57     buttons : [
58      {
59       xtype : 'Button',
60       text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
61       listeners : {
62        click : function (_self, e)
63         {
64             _this.form.reset();
65             _this.dialog.hide();
66         }
67       },
68       xns : Roo,
69       '|xns' : 'Roo'
70      },
71      {
72       xtype : 'Button',
73       text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */,
74       listeners : {
75        click : function (_self, e)
76         {
77             
78             
79             _this.form.submit();
80         }
81       },
82       xns : Roo,
83       '|xns' : 'Roo'
84      }
85     ],
86     items  : [
87      {
88       xtype : 'ContentPanel',
89       region : 'center',
90       xns : Roo,
91       '|xns' : 'Roo',
92       items  : [
93        {
94         xtype : 'Form',
95         labelAlign : 'top',
96         labelWidth : 100,
97         style : 'margin:5px',
98         url : baseURL + '/Roo/Core_person',
99         listeners : {
100          actioncomplete : function (_self, action)
101           { 
102              if (action.type == 'setdata') {
103           
104                   
105           
106                 return;
107                 
108              }
109               if (action.type == 'load') {
110            
111                   return;
112               }
113               if (action.type =='submit') {
114           
115                   
116                   _this.dialog.hide();
117           
118           
119                   if (_this.callback) {
120                     _this.callback.call(_this, action.result.data);
121                   }
122                   _this.form.reset();
123                   return;
124                 } 
125           },
126          rendered : function (form)
127           {
128               _this.form = form;
129           }
130         },
131         xns : Roo.form,
132         '|xns' : 'Roo.form',
133         items  : [
134          {
135           xtype : 'TextArea',
136           actionMode : 'fieldEl',
137           fieldLabel : _this._strings['6dac324294c8f0378abea84fa382b60c'] /* email and new password separeted by a space <br/>(note you can not change your password this way) */,
138           height : 300,
139           name : '_bulk_update_passwords',
140           width : 450,
141           xns : Roo.form,
142           '|xns' : 'Roo.form'
143          }
144         ]
145        }
146       ]
147      }
148     ]
149    });
150  }
151 };