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({
49 cls : 'enable-overflow coba-qr-dialog',
50 title : _this._strings['4674ee874911c910f2356ef9ec6ab7f9'] /* Scan this into Google Authenticator */,
52 hide : function (_self)
55 _this.callback.call(_this, false);
59 show : function (_self)
61 if(!Pman.Login.authUser) {
62 Roo.bootstrap.MessageBox.alert('Error', 'Please login again');
68 _this.data.id.length == 0
70 Roo.bootstrap.MessageBox.alert('Error', 'Please select a person again');
74 _this.dialog.closeEl.hide();
75 _this.cancelBtn.hide();
77 if(_this.data.allow_close) {
78 _this.dialog.closeEl.show();
81 if(_this.data.allow_cancel) {
82 _this.cancelBtn.show();
86 url: baseURL + '/Roo/Core_person.php',
94 success : function(res) {
95 _this.qrcode_image.setSrc(res.data);
98 failure : function(res) {
105 '|xns' : 'Roo.bootstrap',
109 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
112 click : function (_self, e)
118 render : function (_self)
120 _this.cancelBtn = this;
124 '|xns' : 'Roo.bootstrap'
128 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
131 click : function (_self, e)
133 _this.form.doAction('submit');
137 '|xns' : 'Roo.bootstrap'
144 '|xns' : 'Roo.bootstrap',
150 '|xns' : 'Roo.bootstrap',
154 html : _this._strings['dc7b0c7f9d3941532bda06cd58eec7bd'] /*
155 <ol class='qr-list' start="1">
156 <li>Open Google Authenticator in your phone, and scan this QR code.</li>
161 '|xns' : 'Roo.bootstrap'
170 '|xns' : 'Roo.bootstrap',
177 '|xns' : 'Roo.bootstrap',
182 imgResponsive : false,
185 render : function (_self)
187 _this.qrcode_image = this;
189 this.el.setVisibilityMode(Roo.Element.DISPLAY);
194 '|xns' : 'Roo.bootstrap'
203 '|xns' : 'Roo.bootstrap',
209 '|xns' : 'Roo.bootstrap',
213 html : _this._strings['5d412a3d8de0189df31c8f331e2e6630'] /*
214 <ol class='qr-list' start="2">
215 <li>After adding this to Google Authenticator, type in the generated number below to confirm.</li>
220 '|xns' : 'Roo.bootstrap'
229 '|xns' : 'Roo.bootstrap',
235 '|xns' : 'Roo.bootstrap',
240 url : baseURL + '/Roo/Core_person.php',
242 actioncomplete : function (_self, action)
244 if(action.type == 'setdata') {
249 if(action.type == 'submit') {
251 switch(action.result.data) {
254 var cb = function() {
258 Roo.bootstrap.MessageBox.alert('Success', 'Two Factor authentication has been enabled', cb);
262 Roo.log('invalid usage');
267 actionfailed : function (_self, action)
269 if(action.type == 'submit') {
271 switch(action.result.errorMsg) {
272 case '_invalid_auth_code':
273 Roo.bootstrap.MessageBox.alert(
274 'Invalid authentication code',
275 'Please re-enter the latest authentication code.'
279 Roo.log('invalid usage');
284 render : function (_self)
290 '|xns' : 'Roo.bootstrap',
293 xtype : 'NumberField',
295 allowDecimals : false,
296 allowNegative : false,
298 decimalPrecision : 0,
299 fieldLabel : _this._strings['ee468f72ab7fe4937fb014d6fcea540b'] /* Enter Two factor Authentication code */,
300 indicatorpos : 'right',
303 name : 'two_factor_auth_code',
306 '|xns' : 'Roo.bootstrap'
310 inputType : 'hidden',
313 '|xns' : 'Roo.bootstrap'
325 Roo.apply(Pman.Dialog.BAdminStaffTwoFactorQRCode, Pman.Dialog.BAdminStaffTwoFactorQRCode.prototype);