mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 19:34:21 +00:00
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 <d.csapak@proxmox.com>
This commit is contained in:
parent
e341425c73
commit
d790a1b45e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user