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.BAdminStaffTwoFactorQRCode= function() {}
8 Roo.apply(Pman.Dialog.BAdminStaffTwoFactorQRCode.prototype, {
11 'dc7b0c7f9d3941532bda06cd58eec7bd' :"<ol class='qr-list' start=\"1\">\n <li>Open Google Authenticator in your phone, and scan this QR code.</li>\n</ol>",
12 '5d412a3d8de0189df31c8f331e2e6630' :"<ol class='qr-list' start=\"2\">\n <li>After adding this to Google Authenticator, type in the generated number below to confirm.</li>\n</ol>",
13 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
14 'ee468f72ab7fe4937fb014d6fcea540b' :"Enter Two factor Authentication code",
15 '4674ee874911c910f2356ef9ec6ab7f9' :"Scan this into Google Authenticator",
16 '70d9be9b139893aa6c69b5e77e614311' :"Confirm"
19 'two_factor_auth_code_fieldLabel' : 'ee468f72ab7fe4937fb014d6fcea540b' /* Enter Two factor Authentication code */
25 show : function(data, cb)
33 this.dialog.show(this.data._el);
36 this.form.setValues(data);
37 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
45 this.dialog = Roo.factory({
48 cls : 'enable-overflow coba-qr-dialog',
49 title : _this._strings['4674ee874911c910f2356ef9ec6ab7f9'] /* Scan this into Google Authenticator */,
51 show : function (_self)
53 if(!Pman.Login.authUser) {
54 Roo.bootstrap.MessageBox.alert('Error', 'Please login again');
60 _this.data.id.length == 0
62 Roo.bootstrap.MessageBox.alert('Error', 'Please select a person again');
66 _this.dialog.closeEl.hide();
67 _this.cancelBtn.show();
69 if(_this.data.allow_close) {
70 _this.dialog.closeEl.show();
73 if(!_this.data.allow_cancel) {
74 _this.cancelBtn.hide();
78 url: baseURL + '/Roo/Core_person.php',
86 success : function(res) {
87 _this.qrcode_image.setSrc(res.data);
90 failure : function(res) {
97 '|xns' : 'Roo.bootstrap',
101 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
104 click : function (_self, e)
110 _this.callback.call(_this, false);
115 render : function (_self)
117 _this.cancelBtn = this;
121 '|xns' : 'Roo.bootstrap'
125 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
128 click : function (_self, e)
130 _this.form.doAction('submit');
134 '|xns' : 'Roo.bootstrap'
141 '|xns' : 'Roo.bootstrap',
147 '|xns' : 'Roo.bootstrap',
151 html : _this._strings['dc7b0c7f9d3941532bda06cd58eec7bd'] /*
152 <ol class='qr-list' start="1">
153 <li>Open Google Authenticator in your phone, and scan this QR code.</li>
158 '|xns' : 'Roo.bootstrap'
167 '|xns' : 'Roo.bootstrap',
174 '|xns' : 'Roo.bootstrap',
179 imgResponsive : false,
182 render : function (_self)
184 _this.qrcode_image = this;
186 this.el.setVisibilityMode(Roo.Element.DISPLAY);
191 '|xns' : 'Roo.bootstrap'
200 '|xns' : 'Roo.bootstrap',
206 '|xns' : 'Roo.bootstrap',
210 html : _this._strings['5d412a3d8de0189df31c8f331e2e6630'] /*
211 <ol class='qr-list' start="2">
212 <li>After adding this to Google Authenticator, type in the generated number below to confirm.</li>
217 '|xns' : 'Roo.bootstrap'
226 '|xns' : 'Roo.bootstrap',
232 '|xns' : 'Roo.bootstrap',
237 url : baseURL + '/Roo/Core_person.php',
239 actioncomplete : function (_self, action)
241 if(action.type == 'setdata') {
246 if(action.type == 'submit') {
248 switch(action.result.data) {
251 var cb = function() {
255 _this.callback.call(_this, true);
259 Roo.bootstrap.MessageBox.alert('Success', 'Two Factor authentication has been enabled', cb);
263 Roo.log('invalid usage');
268 actionfailed : function (_self, action)
270 if(action.type == 'submit') {
272 switch(action.result.errorMsg) {
273 case '_invalid_auth_code':
274 Roo.bootstrap.MessageBox.alert(
275 'Invalid authentication code',
276 'Please re-enter the latest authentication code.'
280 Roo.log('invalid usage');
285 render : function (_self)
291 '|xns' : 'Roo.bootstrap',
294 xtype : 'NumberField',
296 allowDecimals : false,
297 allowNegative : false,
299 decimalPrecision : 0,
300 fieldLabel : _this._strings['ee468f72ab7fe4937fb014d6fcea540b'] /* Enter Two factor Authentication code */,
301 indicatorpos : 'right',
304 name : 'two_factor_auth_code',
307 '|xns' : 'Roo.bootstrap'
311 inputType : 'hidden',
314 '|xns' : 'Roo.bootstrap'
326 Roo.apply(Pman.Dialog.BAdminStaffTwoFactorQRCode, Pman.Dialog.BAdminStaffTwoFactorQRCode.prototype);