1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.BAdminPasswordReset= function() {}
8 Roo.apply(Pman.Dialog.BAdminPasswordReset.prototype, {
11 'acd43bedab51b6704bf10d9ac136a032' :"Reset management password",
12 '10ac3d04253ef7e1ddc73e6091c0cd55' :"Next",
13 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
14 'bbddd6ba0948d79e55486e615a265b56' :"Enter your new password",
15 'c4ca4238a0b923820dcc509a6f75849b' :"1",
16 '6d70a993714d2699e1d30e03d2753850' :"Please enter again to confirm"
19 'ResetPassword_value' : 'c4ca4238a0b923820dcc509a6f75849b' /* 1 */ ,
20 'ok_html' : '10ac3d04253ef7e1ddc73e6091c0cd55' /* Next */ ,
21 'cancel_html' : 'ea4788705e6873b424c65e91c2846b19' /* Cancel */ ,
22 'password2_fieldLabel' : '6d70a993714d2699e1d30e03d2753850' /* Please enter again to confirm */ ,
23 'password1_fieldLabel' : 'bbddd6ba0948d79e55486e615a265b56' /* Enter your new password */
29 show : function(data, cb)
37 this.dialog.show(this.data._el);
40 this.form.setValues(data);
41 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
49 this.dialog = Roo.factory({
53 buttonPosition : 'center',
54 cls : 'enable-overflow roo-bootstrap-dialog',
55 title : _this._strings['acd43bedab51b6704bf10d9ac136a032'] /* Reset management password */,
57 show : function (_self)
59 _this.dialog.el.select('.modal-content', true).first().unmask();
60 var p1 = _this.form.findField('password1');
61 p1.focus.defer(100, p1);
65 '|xns' : 'Roo.bootstrap',
69 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
73 click : function (_self, e)
75 _this.callback.call(_this, false);
79 '|xns' : 'Roo.bootstrap'
83 html : _this._strings['10ac3d04253ef7e1ddc73e6091c0cd55'] /* Next */,
87 click : function (_self, e)
89 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
90 _this.form.doAction('submit');
94 '|xns' : 'Roo.bootstrap'
101 '|xns' : 'Roo.bootstrap',
107 '|xns' : 'Roo.bootstrap',
114 style : 'padding: 10px;',
115 url : baseURL + '/Login',
116 verifyCheckSum : function()
121 url: baseURL + '/Login',
123 mask : 'Verifying...',
125 id : _this.form.findField('id').getValue(),
126 ts : _this.form.findField('ts').getValue(),
127 key : _this.form.findField('key').getValue(),
130 success : function(res) {
133 failure : function(res)
136 Roo.MessageBox.alert("Sorry", res.message, function() {
137 _this.callback(false,false);
144 actioncomplete : function (_self, action) {
146 if (action.type == 'setdata') {
148 var pathname = window.location.pathname.split('PasswordReset/');
150 if(typeof(pathname[1]) == 'undefined'){
154 var data = pathname[1].split('/');
156 if(data.length != 3){
158 Roo.bootstrap.MessageBox.alert('Sorry', 'Account reset link is not correct - please try again or paste the link correctly');
162 _this.form.findField('id').setValue(data[0]);
163 _this.form.findField('ts').setValue(data[1]);
164 _this.form.findField('key').setValue(data[2]);
166 _this.form.clearInvalid();
168 _this.form.verifyCheckSum();
172 if (action.type == 'load') {
176 if (action.type =='submit') {
180 Roo.MessageBox.alert("Great", "We have successfully updated your password, please use it to login now",
182 if (_this.callback) {
183 _this.callback.call(_this, action.result);
196 actionfailed : function (_self, action) {
198 Roo.log('action fail?');
201 _this.dialog.el.select('.modal-content', true).first().unmask();
203 var err = 'Fill in all the required fields';
205 if (typeof(action) != 'undefined' && action.failureType == 'server') {
206 err = action.result.errorMsg;
209 Roo.bootstrap.MessageBox.alert('Error', err);
211 render : function (_self) {
216 '|xns' : 'Roo.bootstrap',
221 '|xns' : 'Roo.bootstrap',
227 '|xns' : 'Roo.bootstrap',
232 fieldLabel : _this._strings['bbddd6ba0948d79e55486e615a265b56'] /* Enter your new password */,
233 inputType : 'password',
236 specialkey : function (_self, e)
238 if(e.getKey() == 13){
239 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
240 _this.form.doAction('submit');
245 '|xns' : 'Roo.bootstrap'
250 fieldLabel : _this._strings['6d70a993714d2699e1d30e03d2753850'] /* Please enter again to confirm */,
251 inputType : 'password',
254 specialkey : function (_self, e)
256 if(e.getKey() == 13){
257 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
258 _this.form.doAction('submit');
263 '|xns' : 'Roo.bootstrap'
267 inputType : 'hidden',
270 '|xns' : 'Roo.bootstrap'
274 inputType : 'hidden',
277 '|xns' : 'Roo.bootstrap'
281 inputType : 'hidden',
284 '|xns' : 'Roo.bootstrap'
288 inputType : 'hidden',
289 name : 'ResetPassword',
292 '|xns' : 'Roo.bootstrap'
308 Roo.apply(Pman.Dialog.BAdminPasswordReset, Pman.Dialog.BAdminPasswordReset.prototype);