]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
ui: lvm-thin: fix not being able to edit the storage
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 21 Mar 2023 09:16:10 +0000 (10:16 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 21 Mar 2023 09:29:18 +0000 (10:29 +0100)
The change handler of the edit config from a displayEditField still
triggers, even if hidden and disabled. This then enables another
editConfig part of a displayEditField, which triggers an error in the
API.

To fix that, simply check if this field is disabled before setting
the other fields value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/storage/LvmThinEdit.js

index c3b55d87d4296ae65d21ffb6297f303c75515752..63f1fd78fe25cc954d2c0ac12849e6410945611d 100644 (file)
@@ -148,7 +148,7 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
                    },
                    change: function(f, value) {
                        let vgField = this.up('inputpanel').lookup('thinPoolSelector');
-                       if (vgField) {
+                       if (vgField && !f.isDisabled()) {
                            vgField.setDisabled(!value);
                            vgField.setVG(value);
                            vgField.setValue('');