From 8824917be26413ae9558ec9f53616dda01c2a5bb Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 20 Jun 2023 00:31:21 +0200 Subject: [PATCH] luci-mod-network: fix incorrectly reverting vlan device name Fixes: #6435 Signed-off-by: Jo-Philipp Wich (cherry picked from commit b2546c26b5b33bf3f740149dc1a52a7ad3d6ee30) --- .../htdocs/luci-static/resources/tools/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js index 97bbf0ab5d..092bbbc14a 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -475,7 +475,7 @@ return baseclass.extend({ vid = this.section.formvalue(section_id, 'vid'), name = this.section.getUIElement(section_id, 'name_complex'); - if (base && vid && name && !name.isChanged()) { + if (base && vid && name && !name.isChanged() && isNew) { name.setValue('%s.%d'.format(base, vid)); name.triggerValidation(); } -- 2.30.2