Commit 691f530d ("network: optionally show alternative interface
names") introduced the optional altnames field in the network edit
grid. The chosen default configuration however does not even add the
field, therefore setting it to hidden if no altnames data is present
cannot work.

Fix this by only hiding the field if it was actually configured to be
shown in the first place.

Fixes: 691f530d ("network: optionally show alternative interface names")
Signed-off-by: Christian Ebner <c.eb...@proxmox.com>
---
 src/node/NetworkEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
index cd9dc7c..601d788 100644
--- a/src/node/NetworkEdit.js
+++ b/src/node/NetworkEdit.js
@@ -465,7 +465,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
                         if (Ext.isArray(data.altnames)) {
                             data.altnames = data.altnames.join('<br>');
                         }
-                    } else {
+                    } else if (me.showAltNames && !me.isCreate) {
                         me.down('field[name=altnames]').setVisible(false);
                     }
                     me.setValues(data);
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to