{ "name" : "Pman.Dialog.BAdminStaffTwoFactorQRCode", "parent" : "", "title" : "", "path" : "/home/john/gitlive/web.coba/Pman/BAdmin/Pman.Dialog.BAdminStaffTwoFactorQRCode.bjs", "permname" : "", "modOrder" : "001", "strings" : { "dc7b0c7f9d3941532bda06cd58eec7bd" : "
    \n
  1. Open Google Authenticator in your phone, and scan this QR code.
  2. \n
", "5d412a3d8de0189df31c8f331e2e6630" : "
    \n
  1. After adding this to Google Authenticator, type in the generated number below to confirm.
  2. \n
", "ea4788705e6873b424c65e91c2846b19" : "Cancel", "ee468f72ab7fe4937fb014d6fcea540b" : "Enter Two factor Authentication code", "4674ee874911c910f2356ef9ec6ab7f9" : "Scan this into Google Authenticator", "70d9be9b139893aa6c69b5e77e614311" : "Confirm" }, "named_strings" : { "two_factor_auth_code_fieldLabel" : "ee468f72ab7fe4937fb014d6fcea540b" }, "items" : [ { "listeners" : { "show" : "function (_self)\n{\n // this dialog is generic for change password for auth user && edit person\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 /*\n switch(_this.data.title) {\n case '_setup':\n this.setTitle(this._setup_title);\n break;\n default:\n this.setTitle(this._default_title);\n break;\n }\n */\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);\n },\n \n failure : function(res) {\n Roo.log(res);\n }\n });\n}" }, "String cls" : "enable-overflow coba-qr-dialog", "Boolean allow_close" : false, "xtype" : "Modal", "$ xns" : "Roo.bootstrap", "String title" : "Scan this into Google Authenticator", "items" : [ { "listeners" : { "click" : "function (_self, e)\n{\n \n _this.dialog.hide();\n \n if(_this.callback){\n _this.callback.call(_this, false);\n }\n \n return;\n}" }, "String weight" : "default", "xtype" : "Button", "$ xns" : "Roo.bootstrap", "String html" : "Cancel", "* prop" : "buttons[]" }, { "listeners" : { "click" : "function (_self, e)\n{\n _this.form.doAction('submit');\n}" }, "String weight" : "primary", "xtype" : "Button", "$ xns" : "Roo.bootstrap", "String html" : "Confirm", "* prop" : "buttons[]" }, { "xtype" : "Row", "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Column", "Number xs" : 12, "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Container", "$ xns" : "Roo.bootstrap", "String well" : "sm", "String html" : "
    \n
  1. Open Google Authenticator in your phone, and scan this QR code.
  2. \n
" } ] } ] }, { "xtype" : "Row", "$ xns" : "Roo.bootstrap", "items" : [ { "String cls" : "text-center", "xtype" : "Column", "Number xs" : 12, "$ xns" : "Roo.bootstrap", "items" : [ { "listeners" : { "render" : "function (_self)\n{\n _this.qrcode_image = this;\n \n this.el.setVisibilityMode(Roo.Element.DISPLAY);\n \n}" }, "Boolean imgResponsive" : false, "String cls" : "qr-code", "xtype" : "Img", "String src" : "about:blank", "$ xns" : "Roo.bootstrap" } ] } ] }, { "xtype" : "Row", "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Column", "Number xs" : 12, "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Container", "$ xns" : "Roo.bootstrap", "String well" : "sm", "String html" : "
    \n
  1. After adding this to Google Authenticator, type in the generated number below to confirm.
  2. \n
" } ] } ] }, { "xtype" : "Row", "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Column", "Number xs" : 12, "$ xns" : "Roo.bootstrap", "items" : [ { "listeners" : { "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}", "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 if(_this.callback){\n _this.callback.call(_this, true);\n }\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}", "render" : "function (_self)\n{\n _this.form = this;\n}" }, "xtype" : "Form", "$ xns" : "Roo.bootstrap", "String method" : "GET", "$ String url" : "baseURL + '/Roo/Core_person.php'", "items" : [ { "Boolean allowBlank" : false, "Number maxLength" : 6, "Boolean allowZero" : false, "String name" : "two_factor_auth_code", "Boolean allowDecimals" : false, "xtype" : "NumberField", "string fieldLabel" : "Enter Two factor Authentication code", "String labelAlign" : "top", "Number xs" : 12, "Number decimalPrecision" : 0, "$ xns" : "Roo.bootstrap", "Boolean allowNegative" : false, "String indicatorpos" : "right" }, { "String name" : "id", "xtype" : "Input", "String inputType" : "hidden", "$ xns" : "Roo.bootstrap" } ] } ] } ] } ] } ] }