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.Login= function() {}
8 Roo.apply(Pman.Dialog.Login.prototype, {
11 'e50b62fb8271673bacc2cfd9d80fbe7a' :"Login to the Management Portal",
12 'cfcd208495d565ef66e7dff9f98764da' :"0",
13 'dc647eb65e6711e155375218212b3964' :"Password",
14 '01a569ddc6cf67ddec2a683f0a5f5956' :"Forgot your password?",
15 '06cf692a8d2bb0ab8318dc6c839ae931' :"Two-Factor Authentication Number (if relevant)",
16 '11163ed17ad9afc7680bb9e92f15d6fd' :"We have sent you a link to reset your password",
17 '5047040b025ce0295b58d42250014417' :"<div id=\"login-err\" class=\"dialog-err\" style=\"color:red\"></div>",
18 '24efa7ee4511563b16144f39706d594f' :"Notice",
19 '8e823efede631846c2701749fe63afe0' :"Forgot Password ?",
20 '643a860f992333b8600ea264aca7c4fc' :"Email Address"
26 show : function(data, cb)
34 this.dialog.show(this.data._el);
37 this.form.setValues(data);
38 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
46 this.dialog = Roo.factory({
49 buttonPosition : 'center',
50 buttons : Roo.bootstrap.Modal.OK,
51 cls : 'enable-overflow login-dialog',
52 _dialog_title_login : _this._strings['e50b62fb8271673bacc2cfd9d80fbe7a'] /* Login to the Management Portal */,
54 btnclick : function (e)
61 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
62 _this.form.doAction('submit');
64 render : function (_self) {
66 Roo.get('login-err').dom.innerHTML = "";
67 _this.dialog.el.select('.modal-content', true).first().unmask();
73 show : function (_self)
77 this.setTitle( _this.dialog._dialog_title_login );
79 if (!Roo.state.Manager.getProvider().expires) {
80 Roo.state.Manager.setProvider(new Roo.state.CookieProvider());
83 _this.lastLogin = Roo.state.Manager.get('Pman.Login', {});
84 _this.form.findField('username').focus();
90 '|xns' : 'Roo.bootstrap',
95 html : _this._strings['8e823efede631846c2701749fe63afe0'] /* Forgot Password ? */,
96 preventDefault : true,
101 click : function (_self, e)
105 Coba.Dialog.ForgotPassword.show({
106 username : _this.form.findField('username').getValue()
108 Roo.bootstrap.MessageBox.alert('Notice', 'We have sent you a link to reset your password');
114 '|xns' : 'Roo.bootstrap'
121 render : function (_self)
125 this.el.setVisibilityMode(Roo.Element.DISPLAY);
129 '|xns' : 'Roo.bootstrap',
135 '|xns' : 'Roo.bootstrap',
139 style : 'margin-top:20px;',
141 '|xns' : 'Roo.bootstrap',
147 '|xns' : 'Roo.bootstrap',
154 url : baseURL + '/Login',
156 actioncomplete : function (_self, action) {
158 if(action.type == 'setdata'){
162 _this.lastLogin.login_provider == ''
164 _this.form.findField('username').setValue(_this.lastLogin.email);
167 Roo.get('login-err').dom.innerHTML = "";
168 _this.dialog.el.select('.modal-content', true).first().unmask();
173 if(action.type == 'load'){
178 if (action.type =='submit') {
182 if (_this.callback) {
183 _this.callback.call(_this, action.result);
191 actionfailed : function (_self, action) {
192 Roo.log('action failed?!');
195 _this.dialog.el.select('.modal-content', true).first().unmask();
197 if (typeof(action) != 'undefined' && action.failureType == 'server') {
199 if(action.result.errorMsg == 'Authenticated'){
200 var data = Roo.apply(action.result.errors);
202 data.target = _this.form.findField('username').getValue();
204 Roo.bootstrap.MessageBox.alert("Error", "odd error messages")
208 Roo.get('login-err').dom.innerHTML = action.result.errorMsg;
212 Roo.get('login-err').dom.innerHTML = "Fill in all the required fields";
214 render : function (_self) {
219 '|xns' : 'Roo.bootstrap',
225 '|xns' : 'Roo.bootstrap',
232 placeholder : _this._strings['643a860f992333b8600ea264aca7c4fc'] /* Email Address */,
235 specialkey : function (_self, e)
237 if(e.getKey() == 13){
238 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
239 _this.form.doAction('submit');
245 '|xns' : 'Roo.bootstrap'
250 inputType : 'password',
252 placeholder : _this._strings['dc647eb65e6711e155375218212b3964'] /* 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'
268 inputType : 'number',
269 name : 'oath_password',
270 placeholder : _this._strings['06cf692a8d2bb0ab8318dc6c839ae931'] /* Two-Factor Authentication Number (if relevant) */,
272 specialkey : function (_self, e)
274 if(e.getKey() == 13){
275 _this.dialog.el.select('.modal-content', true).first().mask('Sending...');
276 _this.form.doAction('submit');
281 '|xns' : 'Roo.bootstrap'
285 inputType : 'hidden',
289 '|xns' : 'Roo.bootstrap'
301 style : 'margin-top: 20px;',
303 '|xns' : 'Roo.bootstrap',
309 '|xns' : 'Roo.bootstrap',
313 _forgot_passwd_success_body : _this._strings['11163ed17ad9afc7680bb9e92f15d6fd'] /* We have sent you a link to reset your password */,
314 _forgot_passwd_success_title : _this._strings['24efa7ee4511563b16144f39706d594f'] /* Notice */,
316 html : _this._strings['01a569ddc6cf67ddec2a683f0a5f5956'] /* Forgot your password? */,
321 click : function () {
325 var email = _this.form.findField('username').getValue();
329 Pman.Dialog.BAdminForgotPassword.show({email : email}, function(){
330 Roo.bootstrap.MessageBox.alert(_self._forgot_passwd_success_title, _self._forgot_passwd_success_body);
335 '|xns' : 'Roo.bootstrap'
344 '|xns' : 'Roo.bootstrap',
350 '|xns' : 'Roo.bootstrap',
355 html : _this._strings['5047040b025ce0295b58d42250014417'] /* <div id="login-err" class="dialog-err" style="color:red"></div> */,
356 style : 'margin-top:20px;',
358 '|xns' : 'Roo.bootstrap'
370 _forgot_passwd_success_body : _this._strings['11163ed17ad9afc7680bb9e92f15d6fd'] /* We have sent you a link to reset your password */,
371 _forgot_passwd_success_title : _this._strings['24efa7ee4511563b16144f39706d594f'] /* Notice */,
373 html : _this._strings['01a569ddc6cf67ddec2a683f0a5f5956'] /* Forgot your password? */,
379 click : function () {
383 var email = _this.form.findField('username').getValue();
387 Pman.Dialog.BAdminForgotPassword.show({email : email}, function(){
388 Roo.bootstrap.MessageBox.alert(_self._forgot_passwd_success_title, _self._forgot_passwd_success_body);
393 '|xns' : 'Roo.bootstrap'
399 Roo.apply(Pman.Dialog.Login, Pman.Dialog.Login.prototype);