2 "name" : "Pman.Dialog.BAdminStaffTwoFactorQRCode",
5 "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Dialog.BAdminStaffTwoFactorQRCode.bjs",
9 "1459eb538ddc78e1908bbd761a444395" : "1. Download an Authentication App on your phone, like \"<a href='#' class='download-google-authenticator' style='color:#337ab7;'>Google Authenticator</a>\" or \"<a href='#' class='download-authy' style='color:#337ab7;'>Authy</a>\" ",
10 "e8e9a5b1083b253b726d1fa7f31176f5" : "2. After adding this to Authenticator app, type in the generated number below to confirm.",
11 "2194867d6c27ce97cd1f0a5db8d5c95e" : "Setup 2-Factor Authentication",
12 "22e960368d2513a40b7467ec143440cc" : "5. After adding this to Authenticator app, type in the generated number below to confirm.",
13 "131e3875e777f6c9a8e510f96a4d20d2" : "Skip for now",
14 "f93dadd0b45b370c51bf80fb0a3eadfa" : "3. For the Account Name user \"{0}\"",
15 "8e5b55264e2acf73fb73b6a327bccd51" : "4. Enter the code below as \"Your Key\"",
16 "4141195b21d661e36e56d91f19d53273" : "2. In the App, select \"<b>Create or Setup an Account</b>\"",
17 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
18 "ee468f72ab7fe4937fb014d6fcea540b" : "Enter Two factor Authentication code",
19 "6d9785b18748c30bb3adbf7506f40202" : "1. Open Authenticator App in your phone, and scan this QR code.",
20 "780573538d031cf7387477f9ea3204f6" : "Copy Key",
21 "70d9be9b139893aa6c69b5e77e614311" : "Confirm"
24 "two_factor_auth_code_fieldLabel" : "ee468f72ab7fe4937fb014d6fcea540b"
29 "show" : "function (_self)\n{\n if(!Pman.Login.authUser) {\n Roo.bootstrap.MessageBox.alert('Error', 'Please login again');\n return;\n }\n \n if(\n !_this.data.id ||\n _this.data.id.length == 0\n ) {\n Roo.bootstrap.MessageBox.alert('Error', 'Please select a person again');\n return;\n }\n \n _this.dialog.closeEl.hide();\n _this.skipBtn.hide();\n _this.cancelBtn.hide();\n \n if(_this.data.allow_close) {\n _this.dialog.closeEl.show();\n _this.skipBtn.show();\n }\n \n if(_this.data.allow_cancel) {\n _this.cancelBtn.show();\n }\n \n _this.desktopView.hide();\n _this.mobileView.hide();\n \n new Pman.Request({\n url: baseURL + '/Roo/Core_person.php',\n method : 'GET',\n mask : 'Loading...',\n params : {\n _to_qr_code : 1,\n id: _this.data.id\n },\n \n success : function(res) {\n _this.qrcode_image.setSrc(res.data.image);\n _this.secret.setValue(res.data.secret);\n _this.issuer_notify.el.dom.innerHTML = String.format(_this.issuer_notify._html, res.data.issuer);\n \n _this.desktopView.show();\n _this.mobileView.hide();\n \n if(Roo.isTouch) {\n _this.desktopView.hide();\n _this.mobileView.show();\n }\n },\n \n failure : function(res) {\n Roo.log(res);\n }\n });\n}",
30 "hide" : "function (_self)\n{\n if(_this.callback){\n _this.callback.call(_this, false);\n }\n \n}"
32 "String cls" : "enable-overflow coba-qr-dialog",
33 "Boolean animate" : false,
34 "Boolean allow_close" : true,
36 "$ xns" : "Roo.bootstrap",
37 "String title" : "Setup 2-Factor Authentication",
41 "render" : "function (_self)\n{\n _this.skipBtn = this;\n}",
42 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n \n return;\n}"
44 "String weight" : "default",
46 "$ xns" : "Roo.bootstrap",
47 "String html" : "Skip for now",
48 "* prop" : "buttons[]"
52 "render" : "function (_self)\n{\n _this.cancelBtn = this;\n}",
53 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n \n return;\n}"
55 "String weight" : "default",
57 "$ xns" : "Roo.bootstrap",
58 "String html" : "Cancel",
59 "* prop" : "buttons[]"
63 "click" : "function (_self, e)\n{\n _this.form.doAction('submit');\n}"
65 "String weight" : "primary",
67 "$ xns" : "Roo.bootstrap",
68 "String html" : "Confirm",
69 "* prop" : "buttons[]"
73 "render" : "function (_self)\n{\n _this.desktopView = this;\n}"
76 "$ xns" : "Roo.bootstrap",
81 "$ xns" : "Roo.bootstrap",
85 "$ xns" : "Roo.bootstrap",
90 "$ xns" : "Roo.bootstrap",
93 "xtype" : "Container",
94 "$ xns" : "Roo.bootstrap",
96 "String html" : "1. Open Authenticator App in your phone, and scan this QR code."
104 "$ xns" : "Roo.bootstrap",
107 "String cls" : "text-center",
110 "$ xns" : "Roo.bootstrap",
114 "render" : "function (_self)\n{\n _this.qrcode_image = this;\n \n this.el.setVisibilityMode(Roo.Element.DISPLAY);\n \n}"
116 "Boolean imgResponsive" : false,
117 "String cls" : "qr-code",
119 "String src" : "about:blank",
120 "$ xns" : "Roo.bootstrap"
128 "$ xns" : "Roo.bootstrap",
133 "$ xns" : "Roo.bootstrap",
136 "xtype" : "Container",
137 "$ xns" : "Roo.bootstrap",
138 "String well" : "sm",
139 "String html" : "2. After adding this to Authenticator app, type in the generated number below to confirm."
151 "render" : "function (_self)\n{\n _this.mobileView = this;\n}"
154 "$ xns" : "Roo.bootstrap",
159 "$ xns" : "Roo.bootstrap",
163 "$ xns" : "Roo.bootstrap",
168 "$ xns" : "Roo.bootstrap",
172 "render" : "function (_self)\n{\n this.el.select('.download-google-authenticator', true).first().on('click', function(e){\n e.preventDefault();\n \n if(Roo.isIOS) {\n window.open(\"https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8\", \"_blank\");\n return;\n }\n \n window.open(\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2\", \"_blank\");\n });\n \n this.el.select('.download-authy', true).first().on('click', function(e){\n e.preventDefault();\n \n if(Roo.isIOS) {\n window.open(\"https://itunes.apple.com/us/app/authy/id494168017?mt=8\", \"_blank\");\n return;\n }\n \n window.open(\"https://play.google.com/store/apps/details?id=com.ionicpremium.authy\", \"_blank\");\n });\n}"
174 "xtype" : "Container",
175 "$ xns" : "Roo.bootstrap",
176 "String well" : "sm",
177 "String html" : "1. Download an Authentication App on your phone, like \"<a href='#' class='download-google-authenticator' style='color:#337ab7;'>Google Authenticator</a>\" or \"<a href='#' class='download-authy' style='color:#337ab7;'>Authy</a>\" "
185 "$ xns" : "Roo.bootstrap",
190 "$ xns" : "Roo.bootstrap",
193 "xtype" : "Container",
194 "$ xns" : "Roo.bootstrap",
195 "String well" : "sm",
196 "String html" : "2. In the App, select \"<b>Create or Setup an Account</b>\""
204 "$ xns" : "Roo.bootstrap",
209 "$ xns" : "Roo.bootstrap",
213 "render" : "function (_self)\n{\n _this.issuer_notify = this;\n}"
215 "xtype" : "Container",
216 "string _html" : "3. For the Account Name user \"{0}\"",
217 "$ xns" : "Roo.bootstrap",
218 "String well" : "sm",
219 "String html" : "3. For the Account Name user \"{0}\""
227 "$ xns" : "Roo.bootstrap",
232 "$ xns" : "Roo.bootstrap",
235 "xtype" : "Container",
236 "$ xns" : "Roo.bootstrap",
237 "String well" : "sm",
238 "String html" : "4. Enter the code below as \"Your Key\""
246 "$ xns" : "Roo.bootstrap",
251 "$ xns" : "Roo.bootstrap",
255 "render" : "function (_self)\n{\n _this.secret = this;\n}"
257 "String name" : "secret",
258 "Boolean readOnly" : true,
260 "$ xns" : "Roo.bootstrap"
265 "String cls" : "text-center",
268 "$ xns" : "Roo.bootstrap",
272 "click" : "function (_self, e)\n{\n var el = _this.secret.inputEl().dom;\n \n\tif (document.body.createTextRange) {\n\t // IE\n var textRange = document.body.createTextRange();\n textRange.moveToElementText(el);\n textRange.select();\n textRange.execCommand(\"Copy\");\n } else if (window.getSelection && document.createRange) {\n // Non-IE\n var editable = el.contentEditable; // Record contentEditable status of element\n var readOnly = el.readOnly; // Record readOnly status of element\n \tel.contentEditable = true; // iOS will only select text on non-form elements if contentEditable = true;\n \tel.readOnly = false; // iOS will not select in a read only form element\n var range = document.createRange();\n range.selectNodeContents(el);\n var sel = window.getSelection();\n sel.removeAllRanges();\n sel.addRange(range); // Does not work for Firefox if a textarea or input\n \n if (el.nodeName == \"TEXTAREA\" || el.nodeName == \"INPUT\") {\n el.select(); // Firefox will only select a form element with select()\n }\n \t\n if (el.setSelectionRange && navigator.userAgent.match(/ipad|ipod|iphone/i)) {\n el.setSelectionRange(0, 999999); // iOS only selects \"form\" elements with SelectionRange\n }\n \t\n el.contentEditable = editable; // Restore previous contentEditable status\n el.readOnly = readOnly; // Restore previous readOnly status \n \n document.execCommand('copy');\n }\n}"
274 "String size" : "sm",
275 "Boolean preventDefault" : true,
277 "$ xns" : "Roo.bootstrap",
278 "String html" : "Copy Key",
279 "String style" : "margin-bottom: 15px;"
287 "$ xns" : "Roo.bootstrap",
292 "$ xns" : "Roo.bootstrap",
295 "xtype" : "Container",
296 "$ xns" : "Roo.bootstrap",
297 "String well" : "sm",
298 "String html" : "5. After adding this to Authenticator app, type in the generated number below to confirm."
310 "$ xns" : "Roo.bootstrap",
315 "$ xns" : "Roo.bootstrap",
319 "actionfailed" : "function (_self, action)\n{\n if(action.type == 'submit') {\n \n switch(action.result.errorMsg) {\n case '_invalid_auth_code':\n Roo.bootstrap.MessageBox.alert(\n 'Invalid authentication code',\n 'Please re-enter the latest authentication code.'\n );\n break;\n default:\n Roo.log('invalid usage');\n break;\n }\n }\n}",
320 "actioncomplete" : "function (_self, action)\n{\n if(action.type == 'setdata') {\n \n this.clearInvalid();\n }\n \n if(action.type == 'submit') {\n \n switch(action.result.data) {\n \n case 'DONE':\n var cb = function() {\n _this.dialog.hide();\n };\n \n Roo.bootstrap.MessageBox.alert('Success', 'Two Factor authentication has been enabled', cb);\n return;\n \n default:\n Roo.log('invalid usage');\n break;\n }\n }\n}",
321 "render" : "function (_self)\n{\n _this.form = this;\n}"
324 "$ xns" : "Roo.bootstrap",
325 "String method" : "GET",
326 "$ String url" : "baseURL + '/Roo/Core_person.php'",
329 "Boolean allowBlank" : false,
330 "Number maxLength" : 6,
331 "Boolean allowZero" : false,
332 "String name" : "two_factor_auth_code",
333 "Boolean allowDecimals" : false,
334 "xtype" : "NumberField",
335 "string fieldLabel" : "Enter Two factor Authentication code",
336 "String labelAlign" : "top",
338 "Number decimalPrecision" : 0,
339 "$ xns" : "Roo.bootstrap",
340 "Boolean allowNegative" : false,
341 "String indicatorpos" : "right"
344 "String name" : "id",
346 "String inputType" : "hidden",
347 "$ xns" : "Roo.bootstrap"