"items" : [
{
"listeners" : {
- "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.cancelBtn.hide();\n \n if(_this.data.allow_close) {\n _this.dialog.closeEl.show();\n }\n \n if(_this.data.allow_cancel) {\n _this.cancelBtn.show();\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}"
+ "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.cancelBtn.hide();\n \n if(_this.data.allow_close) {\n _this.dialog.closeEl.show();\n }\n \n if(_this.data.allow_cancel) {\n _this.cancelBtn.show();\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}",
+ "hide" : "function (_self)\n{\n if(_this.callback){\n _this.callback.call(_this, false);\n }\n \n}"
},
"String cls" : "enable-overflow coba-qr-dialog",
+ "Boolean animate" : false,
"Boolean allow_close" : true,
"xtype" : "Modal",
"$ xns" : "Roo.bootstrap",
{
"listeners" : {
"render" : "function (_self)\n{\n _this.cancelBtn = this;\n}",
- "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}"
+ "click" : "function (_self, e)\n{\n _this.dialog.hide();\n \n return;\n}"
},
"String weight" : "default",
"xtype" : "Button",
{
"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}",
+ "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}",
"render" : "function (_self)\n{\n _this.form = this;\n}"
},
"xtype" : "Form",
this.dialog = Roo.factory({
xtype : 'Modal',
allow_close : true,
+ animate : false,
cls : 'enable-overflow coba-qr-dialog',
title : _this._strings['4674ee874911c910f2356ef9ec6ab7f9'] /* Scan this into Google Authenticator */,
listeners : {
+ hide : function (_self)
+ {
+ if(_this.callback){
+ _this.callback.call(_this, false);
+ }
+
+ },
show : function (_self)
{
if(!Pman.Login.authUser) {
listeners : {
click : function (_self, e)
{
-
_this.dialog.hide();
- if(_this.callback){
- _this.callback.call(_this, false);
- }
-
return;
},
render : function (_self)
case 'DONE':
var cb = function() {
_this.dialog.hide();
-
- if(_this.callback){
- _this.callback.call(_this, true);
- }
};
Roo.bootstrap.MessageBox.alert('Success', 'Two Factor authentication has been enabled', cb);