Merge pull request #5008 from mpratt14/vlan-default

luci-mod-network: do not remove enable_vlan from config
This commit is contained in:
Florian Eckert 2021-09-03 10:46:56 +02:00 committed by GitHub
commit 9b7cf08c0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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'));