From d790a1b45e9a2759e92ffc90c77026432f088251 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 9 Jan 2020 09:59:35 +0100 Subject: [PATCH] fix #2334: gui/cloudinit: enable edit button only when editor is set when a user does not have the right privileges for cloudinit (e.g. VM.Config.Network), we do not set an editor, which results in a button that does nothing when pressed fix this by enabling the button only when there is an editor set Signed-off-by: Dominik Csapak --- www/manager6/qemu/CloudInit.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js index cb4742e5..cbb4af9d 100644 --- a/www/manager6/qemu/CloudInit.js +++ b/www/manager6/qemu/CloudInit.js @@ -65,6 +65,10 @@ Ext.define('PVE.qemu.CloudInit', { { xtype: 'proxmoxButton', disabled: true, + enableFn: function(rec) { + let me = this.up('pveCiPanel'); + return !!me.rows[rec.data.key].editor; + }, handler: function() { var me = this.up('grid'); me.run_editor();