diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-03-29 16:33:07 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-03-29 16:33:07 +0200 |
commit | 7dde01be3cc197f79bc6812a2c912c1889dbf1ee (patch) | |
tree | ab06c0e0287989b3819fba0d6e93e0b7e178bee7 /modules/luci-mod-network/htdocs/luci-static/resources/tools | |
parent | f48f9f11e7f6e3d74e2fd4b6b2478e5673f2f459 (diff) |
luci-mod-network: fix changing ifname in disabled legacy bridge mode
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/tools')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js | 19 |
1 files changed, 11 insertions, 8 deletions
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 4eee9f9576..544cad2c75 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 @@ -382,16 +382,19 @@ return baseclass.extend({ disableLegacyBridging = isIface && deviceSectionExists(null, 'br-%s'.format(ifc.getName()), 'bridge'), o, ss; - /* If an externally configured br-xxx interface already exists, - * then disable legacy bridge configuration */ - if (disableLegacyBridging) { - o = this.addOption(s, gensection, form.HiddenValue, 'type'); - o.cfgvalue = function() { return '' }; - } - else if (isIface) { + if (isIface) { var type; - type = this.addOption(s, gensection, form.Flag, 'type', _('Bridge interfaces'), _('Creates a bridge over specified interface(s)')); + /* If an externally configured br-xxx interface already exists, + * then disable legacy bridge configuration */ + if (disableLegacyBridging) { + type = this.addOption(s, gensection, form.HiddenValue, 'type'); + type.cfgvalue = function() { return '' }; + } + else { + type = this.addOption(s, gensection, form.Flag, 'type', _('Bridge interfaces'), _('Creates a bridge over specified interface(s)')); + } + type.modalonly = true; type.disabled = ''; type.enabled = 'bridge'; |