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)
55 _this.data.id.length > 0
61 url: baseURL + '/Roo/Core_person.php',
69 success : function(res) {
71 _this.qrcode_image.setSrc(res.data);
79 '|xns' : 'Roo.bootstrap',
83 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
86 click : function (_self, e)
94 _this.callback.call(_this);
101 '|xns' : 'Roo.bootstrap'
105 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
108 click : function (_self, e)
110 _this.form.doAction('submit');
116 _this.callback.call(_this);
124 '|xns' : 'Roo.bootstrap'
131 '|xns' : 'Roo.bootstrap',
137 '|xns' : 'Roo.bootstrap',
141 html : _this._strings['dc7b0c7f9d3941532bda06cd58eec7bd'] /*
142 <ol class='qr-list' start="1">
143 <li>Open Google Authenticator in your phone, and scan this QR code.</li>
148 '|xns' : 'Roo.bootstrap'
157 '|xns' : 'Roo.bootstrap',
164 '|xns' : 'Roo.bootstrap',
169 imgResponsive : false,
172 render : function (_self)
174 _this.qrcode_image = this;
176 this.el.setVisibilityMode(Roo.Element.DISPLAY);
181 '|xns' : 'Roo.bootstrap'
190 '|xns' : 'Roo.bootstrap',
196 '|xns' : 'Roo.bootstrap',
200 html : _this._strings['5d412a3d8de0189df31c8f331e2e6630'] /*
201 <ol class='qr-list' start="2">
202 <li>After adding this to Google Authenticator, type in the generated number below to confirm.</li>
207 '|xns' : 'Roo.bootstrap'
216 '|xns' : 'Roo.bootstrap',
222 '|xns' : 'Roo.bootstrap',
227 url : baseURL + '/Roo/Core_person.php',
229 actioncomplete : function (_self, action)
231 if(action.type == 'setdata') {
236 if(action.type == 'submit') {
238 switch(action.result.data) {
241 var cb = function() {
246 _this.callback.call(_this);
249 Roo.bootstrap.MessageBox.alert('Success', 'Two Factor authentication has been enabled', cb);
253 Roo.log('invalid usage');
258 actionfailed : function (_self, action)
260 if(action.type == 'submit') {
262 switch(action.result.errorMsg) {
263 case '_invalid_auth_code':
264 Roo.bootstrap.MessageBox.alert(
265 'Invalid authentication code',
266 'Please re-enter the latest authentication code.'
270 Roo.log('invalid usage');
275 render : function (_self)
281 '|xns' : 'Roo.bootstrap',
284 xtype : 'NumberField',
286 allowDecimals : false,
287 allowNegative : false,
289 decimalPrecision : 0,
290 fieldLabel : _this._strings['ee468f72ab7fe4937fb014d6fcea540b'] /* Enter Two factor Authentication code */,
291 indicatorpos : 'right',
294 name : 'two_factor_auth_code',
297 '|xns' : 'Roo.bootstrap'
301 inputType : 'hidden',
304 '|xns' : 'Roo.bootstrap'
316 Roo.apply(Pman.Dialog.BAdminStaffTwoFactorQRCode, Pman.Dialog.BAdminStaffTwoFactorQRCode.prototype);