"name" : "Pman.Dialog.BAdminPassword",
"parent" : "",
"title" : "",
- "path" : "/home/john/gitlive/web.coba/Pman/BAdmin/Pman.Dialog.BAdminPassword.bjs",
+ "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Dialog.BAdminPassword.bjs",
"permname" : "",
"modOrder" : "001",
"strings" : {
"click" : "function (_self, e)\n{\n var p1 = _this.form.findField('passwd1').getValue();\n var p2 = _this.form.findField('passwd2').getValue();\n \n if(\n !p1.length ||\n !p2.length ||\n p1 !== p2\n ) {\n Roo.bootstrap.MessageBox.alert(\"Error\", \"Passwords do not match\");\n return;\n }\n \n _this.form.findField('changePassword').setValue(1);\n \n this.changeStatus('submit');\n \n _this.form.doAction('submit');\n}"
},
"String weight" : "primary",
- "| function changeStatus" : "function(status)\n{\n switch(status) {\n \n case 'submit':\n this.disable();\n this.setText('sending...');\n break;\n \n case 'loaded':\n this.enable();\n this.setText('OK');\n break;\n \n default:\n break;\n }\n}",
"xtype" : "Button",
+ "| function changeStatus" : "function(status)\n{\n switch(status) {\n \n case 'submit':\n this.disable();\n this.setText('sending...');\n break;\n \n case 'loaded':\n this.enable();\n this.setText('OK');\n break;\n \n default:\n break;\n }\n}",
"$ xns" : "Roo.bootstrap",
"String html" : "Update Password",
"* prop" : "buttons[]"
},
{
"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 Pman.Dialog.BAdminStaffTwoFactorQRCode.show(\n {id: Pman.Login.authUser.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 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: Pman.Login.authUser.id\n },\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 \n failure : function(res)\n {\n Roo.bootstrap.MessageBox.alert('Error', res);\n }\n });\n}",
- "check" : "function (_self, checked)\n{\n if(checked) {\n this.setBoxLabel('Untick to disable Two Factor authentication');\n return;\n }\n \n this.setBoxLabel('Enable Two Factor Authentication');\n}"
+ "check" : "function (_self, checked)\n{\n if(checked) {\n this.setBoxLabel('Untick to disable Two Factor authentication');\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 Pman.Dialog.BAdminStaffTwoFactorQRCode.show(\n {id: Pman.Login.authUser.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 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: Pman.Login.authUser.id\n },\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 \n failure : function(res)\n {\n Roo.bootstrap.MessageBox.alert('Error', res);\n }\n });\n}"
},
"String name" : "_enable_oath_key",
"Boolean checked" : false,