luci-app-firewall: fix zone network default
When a `config zone` section lacks an `option network` or `list network` setting, its contained interface list defaults to the name of the zone, e.g. a zone named `foo` will implicitely contain the network `foo` unless a deviating or empty `option network` is specified. Adjust the zones.js model accordingly to reflect that implicit default. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
4c4d6e2bb2
commit
d60a1a13b0
1 changed files with 3 additions and 0 deletions
|
@ -137,6 +137,9 @@ return L.view.extend({
|
|||
o = s.taboption('general', widgets.NetworkSelect, 'network', _('Covered networks'));
|
||||
o.modalonly = true;
|
||||
o.multiple = true;
|
||||
o.cfgvalue = function(section_id) {
|
||||
return uci.get('firewall', section_id, 'network') || uci.get('firewall', section_id, 'name');
|
||||
};
|
||||
o.write = function(section_id, formvalue) {
|
||||
var name = uci.get('firewall', section_id, 'name'),
|
||||
cfgvalue = this.cfgvalue(section_id);
|
||||
|
|
Loading…
Reference in a new issue