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 'bbddd6ba0948d79e55486e615a265b56' :"Enter your new password",
14 'c4ca4238a0b923820dcc509a6f75849b' :"1",
15 '6d70a993714d2699e1d30e03d2753850' :"Please enter again to confirm"
18 'ResetPassword_value' : 'c4ca4238a0b923820dcc509a6f75849b' /* 1 */ ,
19 'ok_html' : '10ac3d04253ef7e1ddc73e6091c0cd55' /* Next */ ,
20 'password2_fieldLabel' : '6d70a993714d2699e1d30e03d2753850' /* Please enter again to confirm */ ,
21 'password1_fieldLabel' : 'bbddd6ba0948d79e55486e615a265b56' /* Enter your new password */
27 show : function(data, cb)
35 this.dialog.show(this.data._el);
38 this.form.setValues(data);
39 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
47 this.dialog = Roo.factory({
50 buttonPosition : 'center',
51 cls : 'enable-overflow roo-bootstrap-dialog',
52 title : _this._strings['acd43bedab51b6704bf10d9ac136a032'] /* Reset management password */,
54 show : function (_self)
56 _this.dialog.el.select('.modal-content', true).first().unmask();
57 var p1 = _this.form.findField('password1');
58 p1.focus.defer(100, p1);
62 '|xns' : 'Roo.bootstrap',
66 html : _this._strings['10ac3d04253ef7e1ddc73e6091c0cd55'] /* Next */,
70 click : function (_self, e)
72 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
73 _this.form.doAction('submit');
77 '|xns' : 'Roo.bootstrap'
84 '|xns' : 'Roo.bootstrap',
90 '|xns' : 'Roo.bootstrap',
97 style : 'padding: 10px;',
98 url : baseURL + '/Login',
99 verifyCheckSum : function()
104 url: baseURL + '/Login',
106 mask : 'Verifying...',
108 id : _this.form.findField('id').getValue(),
109 ts : _this.form.findField('ts').getValue(),
110 key : _this.form.findField('key').getValue(),
113 success : function(res) {
119 actioncomplete : function (_self, action) {
121 if (action.type == 'setdata') {
123 var pathname = window.location.pathname.split('PasswordReset/');
125 if(typeof(pathname[1]) == 'undefined'){
129 var data = pathname[1].split('/');
131 if(data.length != 3){
133 Roo.bootstrap.MessageBox.alert('Sorry', 'Account reset link is not correct - please try again or paste the link correctly');
137 _this.form.findField('id').setValue(data[0]);
138 _this.form.findField('ts').setValue(data[1]);
139 _this.form.findField('key').setValue(data[2]);
141 _this.form.clearInvalid();
143 _this.form.verifyCheckSum();
147 if (action.type == 'load') {
151 if (action.type =='submit') {
155 if (_this.callback) {
156 _this.callback.call(_this, action.result);
165 actionfailed : function (_self, action) {
167 Roo.log('action fail?');
170 _this.dialog.el.select('.modal-content', true).first().unmask();
172 var err = 'Fill in all the required fields';
174 if (typeof(action) != 'undefined' && action.failureType == 'server') {
175 err = action.result.errorMsg;
178 Roo.bootstrap.MessageBox.alert('Error', err);
180 render : function (_self) {
185 '|xns' : 'Roo.bootstrap',
190 '|xns' : 'Roo.bootstrap',
196 '|xns' : 'Roo.bootstrap',
201 fieldLabel : _this._strings['bbddd6ba0948d79e55486e615a265b56'] /* Enter your new password */,
202 inputType : 'password',
205 specialkey : function (_self, e)
207 if(e.getKey() == 13){
208 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
209 _this.form.doAction('submit');
214 '|xns' : 'Roo.bootstrap'
219 fieldLabel : _this._strings['6d70a993714d2699e1d30e03d2753850'] /* Please enter again to confirm */,
220 inputType : 'password',
223 specialkey : function (_self, e)
225 if(e.getKey() == 13){
226 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
227 _this.form.doAction('submit');
232 '|xns' : 'Roo.bootstrap'
236 inputType : 'hidden',
239 '|xns' : 'Roo.bootstrap'
243 inputType : 'hidden',
246 '|xns' : 'Roo.bootstrap'
250 inputType : 'hidden',
253 '|xns' : 'Roo.bootstrap'
257 inputType : 'hidden',
258 name : 'ResetPassword',
261 '|xns' : 'Roo.bootstrap'
277 Roo.apply(Pman.Dialog.BAdminPasswordReset, Pman.Dialog.BAdminPasswordReset.prototype);