public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH proxmox-widget-toolkit] network edit: fix hiding of altnames field if disabled by config
@ 2025-07-31 11:30 Christian Ebner
  2025-07-31 11:34 ` [pmg-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2025-07-31 11:30 UTC (permalink / raw)
  To: pbs-devel, pve-devel, pmg-devel

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.ebner@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



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-31 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-31 11:30 [pmg-devel] [PATCH proxmox-widget-toolkit] network edit: fix hiding of altnames field if disabled by config Christian Ebner
2025-07-31 11:34 ` [pmg-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal