diff options
author | Nicholas Smith <nicholas.smith@telcoantennas.com.au> | 2019-09-02 11:43:33 +1000 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-11 12:52:24 +0200 |
commit | f9e2d60f1399df4411f6b18f2705d7939815e9df (patch) | |
tree | d28633a10c19377201b7ed82828de6352f951da7 /applications/luci-app-firewall/htdocs/luci-static/resources/view | |
parent | eeced34765e503e473ebc1bcd9aa659f7bbf4e7c (diff) |
luci-app-firewall: display "this new zone" instead of "undefined"
Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
Diffstat (limited to 'applications/luci-app-firewall/htdocs/luci-static/resources/view')
-rw-r--r-- | applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js index 41840a2268..78a6626266 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js @@ -84,7 +84,8 @@ return L.view.extend({ o.modalonly = true; o.cfgvalue = function(section_id) { var name = uci.get('firewall', section_id, 'name'); - + if (name == null) + name = _("this new zone"); return _('This section defines common properties of %q. The <em>input</em> and <em>output</em> options set the default policies for traffic entering and leaving this zone while the <em>forward</em> option describes the policy for forwarded traffic between different networks within the zone. <em>Covered networks</em> specifies which available networks are members of this zone.') .replace(/%s/g, name).replace(/%q/g, '"' + name + '"'); }; @@ -168,7 +169,8 @@ return L.view.extend({ o.modalonly = true; o.cfgvalue = function(section_id) { var name = uci.get('firewall', section_id, 'name'); - + if (name == null) + name = _("this new zone"); return _('The options below control the forwarding policies between this zone (%s) and other zones. <em>Destination zones</em> cover forwarded traffic <strong>originating from %q</strong>. <em>Source zones</em> match forwarded traffic from other zones <strong>targeted at %q</strong>. The forwarding rule is <em>unidirectional</em>, e.g. a forward from lan to wan does <em>not</em> imply a permission to forward from wan to lan as well.') .format(name); }; @@ -258,8 +260,11 @@ return L.view.extend({ o.rawhtml = true; o.modalonly = true; o.cfgvalue = function(section_id) { + var name = uci.get('firewall', section_id, 'name'); + if (name == null) + name = _("this new zone"); return _('The options below control the forwarding policies between this zone (%s) and other zones. <em>Destination zones</em> cover forwarded traffic <strong>originating from %q</strong>. <em>Source zones</em> match forwarded traffic from other zones <strong>targeted at %q</strong>. The forwarding rule is <em>unidirectional</em>, e.g. a forward from lan to wan does <em>not</em> imply a permission to forward from wan to lan as well.') - .format(uci.get('firewall', section_id, 'name')); + .format(name); }; out = o = s.taboption('general', widgets.ZoneSelect, 'out', _('Allow forward to <em>destination zones</em>:')); |