Merge pull request #5008 from mpratt14/vlan-default
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 3 Sep 2021 08:46:56 +0000 (10:46 +0200)
committerGitHub <noreply@github.com>
Fri, 3 Sep 2021 08:46:56 +0000 (10:46 +0200)
luci-mod-network: do not remove enable_vlan from config

modules/luci-mod-network/htdocs/luci-static/resources/view/network/switch.js

index 3133d27250bae37c31b6e2082cded283cbc32f18..8c24775cabe957efa0deafd401503076c6184b31 100644 (file)
@@ -180,8 +180,10 @@ return view.extend({
                        s = m.section(form.NamedSection, sid, 'switch', switch_title);
                        s.addremove = false;
 
-                       if (feat.vlan_option)
-                               s.option(form.Flag, feat.vlan_option, _('Enable VLAN functionality'));
+                       if (feat.vlan_option) {
+                               o = s.option(form.Flag, feat.vlan_option, _('Enable VLAN functionality'));
+                               o.rmempty = false;
+                       }
 
                        if (feat.learning_option) {
                                o = s.option(form.Flag, feat.learning_option, _('Enable learning and aging'));