diff options
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'; |