From 39d12bd4363fcc03d739400404dcd5e8d50fb7de Mon Sep 17 00:00:00 2001 From: Edward Date: Fri, 7 Dec 2018 11:59:19 +0800 Subject: [PATCH] Pman.Dialog.BAdminStaff.bjs Pman.Dialog.BAdminStaff.js --- Pman.Dialog.BAdminStaff.bjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Pman.Dialog.BAdminStaff.bjs b/Pman.Dialog.BAdminStaff.bjs index 19f0128a..846c745c 100644 --- a/Pman.Dialog.BAdminStaff.bjs +++ b/Pman.Dialog.BAdminStaff.bjs @@ -2,7 +2,7 @@ "name" : "Pman.Dialog.BAdminStaff", "parent" : "", "title" : "", - "path" : "/home/veridate/gitlive/Pman.BAdmin/Pman.Dialog.BAdminStaff.bjs", + "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Dialog.BAdminStaff.bjs", "permname" : "", "modOrder" : "001", "strings" : { @@ -88,8 +88,8 @@ "render" : "function (_self)\n{\n _this.form = this;\n}" }, "$ url" : "baseURL + '/Roo/core_person' ", - "style" : "margin-top: 20px;", "xtype" : "Form", + "style" : "margin-top: 20px;", "String labelAlign" : "top", "$ xns" : "Roo.bootstrap", "string errorMask" : true, @@ -191,8 +191,8 @@ "items" : [ { "listeners" : { - "click" : "function (_self, e)\n{\n if(!Pman.Login.authUser) {\n Roo.bootstrap.MessageBox.alert('Error', 'Please login again');\n return;\n }\n \n e.preventDefault();\n \n if(!this.checked) {\n \n Pman.Dialog.BAdminStaffTwoFactorQRCode.show(\n {id: _this.data.id},\n function(valid){\n if(valid) {\n _this.dialog.hide({});\n return;\n }\n \n _this.form.findField('_enable_oath_key').setChecked(false,false);\n }\n );\n \n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/Core_person',\n method :'GET',\n params : {\n oath_key_disable: 1,\n id: _this.data.id\n },\n success : function(res)\n {\n switch(res.data) {\n case 'DONE':\n Roo.bootstrap.MessageBox.alert('Success', 'The two factor authentication has been disabled');\n break;\n default:\n Roo.log('invalid usage');\n break;\n }\n },\n failure : function(res)\n {\n Roo.bootstrap.MessageBox.alert('Error', res);\n }\n });\n}", - "check" : "function (_self, checked)\n{\n if(checked) {\n \n this.setBoxLabel('Untick to disable Two Factor authentication');\n \n return;\n }\n \n this.setBoxLabel('Enable Two Factor Authentication');\n}" + "check" : "function (_self, checked)\n{\n if(checked) {\n \n this.setBoxLabel('Untick to disable Two Factor authentication');\n \n return;\n }\n \n this.setBoxLabel('Enable Two Factor Authentication');\n}", + "click" : "function (_self, e)\n{\n if(!Pman.Login.authUser) {\n Roo.bootstrap.MessageBox.alert('Error', 'Please login again');\n return;\n }\n \n e.preventDefault();\n \n if(!this.checked) {\n \n Pman.Dialog.BAdminStaffTwoFactorQRCode.show(\n {id: _this.data.id},\n function(valid){\n if(valid) {\n _this.dialog.hide({});\n return;\n }\n \n _this.form.findField('_enable_oath_key').setChecked(false,false);\n }\n );\n \n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/Core_person',\n method :'GET',\n params : {\n oath_key_disable: 1,\n id: _this.data.id\n },\n success : function(res)\n {\n switch(res.data) {\n case 'DONE':\n Roo.bootstrap.MessageBox.alert('Success', 'The two factor authentication has been disabled');\n break;\n default:\n Roo.log('invalid usage');\n break;\n }\n },\n failure : function(res)\n {\n Roo.bootstrap.MessageBox.alert('Error', res);\n }\n });\n}" }, "String name" : "_enable_oath_key", "xtype" : "CheckBox", -- 2.39.2