Pman.Dialog.BAdminStaffTwoFactorQRCode.bjs
authorEdward <edward@roojs.com>
Fri, 7 Dec 2018 03:56:58 +0000 (11:56 +0800)
committerEdward <edward@roojs.com>
Fri, 7 Dec 2018 03:56:58 +0000 (11:56 +0800)
Pman.Dialog.BAdminStaffTwoFactorQRCode.js

Pman.Dialog.BAdminStaffTwoFactorQRCode.bjs
Pman.Dialog.BAdminStaffTwoFactorQRCode.js

index 7dec32f..99f6a51 100644 (file)
@@ -19,7 +19,7 @@
  "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.show();\n    \n    if(_this.data.allow_close) {\n        _this.dialog.closeEl.show();\n    }\n    \n    if(!_this.data.allow_cancel) {\n        _this.cancelBtn.hide();\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}"
    },
    "String cls" : "enable-overflow coba-qr-dialog",
    "Boolean allow_close" : true,
index 08c5adb..61c1c52 100644 (file)
@@ -64,14 +64,14 @@ Roo.apply(Pman.Dialog.BAdminStaffTwoFactorQRCode.prototype, {
           }
           
           _this.dialog.closeEl.hide();
-          _this.cancelBtn.show();
+          _this.cancelBtn.hide();
           
           if(_this.data.allow_close) {
               _this.dialog.closeEl.show();
           }
           
-          if(!_this.data.allow_cancel) {
-              _this.cancelBtn.hide();
+          if(_this.data.allow_cancel) {
+              _this.cancelBtn.show();
           }
           
           new Pman.Request({