diff options
Diffstat (limited to 'applications/luci-app-firewall/htdocs/luci-static/resources')
4 files changed, 48 insertions, 40 deletions
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js index 16fae25f42..cbd4362049 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js @@ -149,9 +149,10 @@ return view.extend({ var config_name = this.uciconfig || this.map.config, section_id = uci.add(config_name, this.sectiontype); + uci.set(config_name, section_id, 'dest', 'lan'); uci.set(config_name, section_id, 'target', 'DNAT'); - this.addedSection = section_id; + m.addedSection = section_id; this.renderMoreOptionsModal(section_id); }; @@ -229,7 +230,6 @@ return view.extend({ o.modalonly = true; o.rmempty = true; o.nocreate = true; - o.default = 'lan'; o = fwtool.addIPOption(s, 'general', 'dest_ip', _('Internal IP address'), _('Redirect matched incoming traffic to the specified internal host'), 'ipv4', hosts); @@ -281,10 +281,12 @@ return view.extend({ fwtool.addLimitOption(s); fwtool.addLimitBurstOption(s); - o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'), - _('Passes additional arguments to iptables. Use with care!')); - o.modalonly = true; - o.rmempty = true; + if (!L.hasSystemFeature('firewall4')) { + o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'), + _('Passes additional arguments to iptables. Use with care!')); + o.modalonly = true; + o.rmempty = true; + } return m.render(); } diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js index 7f073e99cd..c579c4aab1 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js @@ -240,7 +240,7 @@ return view.extend({ var stop_date = uci.get('firewall', section_id, 'stop_date'); if (weekdays || monthdays || start_time || stop_time || start_date || stop_date ) - return _('Time restritions are enabled for this rule'); + return _('Time restrictions are enabled for this rule'); return null; }; @@ -432,9 +432,11 @@ return view.extend({ fwtool.addLimitOption(s); fwtool.addLimitBurstOption(s); - o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'), - _('Passes additional arguments to iptables. Use with care!')); - o.modalonly = true; + if (!L.hasSystemFeature('firewall4')) { + o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'), + _('Passes additional arguments to iptables. Use with care!')); + o.modalonly = true; + } o = s.taboption('timed', form.MultiValue, 'weekdays', _('Week Days')); o.modalonly = true; diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js index d021397976..e8c90a7574 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js @@ -245,10 +245,12 @@ return view.extend({ fwtool.addLimitOption(s); fwtool.addLimitBurstOption(s); - o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'), - _('Passes additional arguments to iptables. Use with care!')); - o.modalonly = true; - o.rmempty = true; + if (!L.hasSystemFeature('firewall4')) { + o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'), + _('Passes additional arguments to iptables. Use with care!')); + o.modalonly = true; + o.rmempty = true; + } o = s.taboption('timed', form.MultiValue, 'weekdays', _('Week Days')); o.modalonly = true; 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 f9d84bfb67..58cd2a7c1e 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 @@ -269,32 +269,34 @@ return view.extend({ o.placeholder = '10/minute'; o.modalonly = true; - o = s.taboption('extra', form.DummyValue, '_extrainfo'); - o.rawhtml = true; - o.modalonly = true; - o.cfgvalue = function(section_id) { - return _('Passing raw iptables arguments to source and destination traffic classification rules allows to match packets based on other criteria than interfaces or subnets. These options should be used with extreme care as invalid values could render the firewall ruleset broken, completely exposing all services.'); - }; - - o = s.taboption('extra', form.Value, 'extra_src', _('Extra source arguments'), _('Additional raw <em>iptables</em> arguments to classify zone source traffic, e.g. <code>-p tcp --sport 443</code> to only match inbound HTTPS traffic.')); - o.modalonly = true; - o.cfgvalue = function(section_id) { - return uci.get('firewall', section_id, 'extra_src') || uci.get('firewall', section_id, 'extra'); - }; - o.write = function(section_id, value) { - uci.unset('firewall', section_id, 'extra'); - uci.set('firewall', section_id, 'extra_src', value); - }; - - o = s.taboption('extra', form.Value, 'extra_dest', _('Extra destination arguments'), _('Additional raw <em>iptables</em> arguments to classify zone destination traffic, e.g. <code>-p tcp --dport 443</code> to only match outbound HTTPS traffic.')); - o.modalonly = true; - o.cfgvalue = function(section_id) { - return uci.get('firewall', section_id, 'extra_dest') || uci.get('firewall', section_id, 'extra_src') || uci.get('firewall', section_id, 'extra'); - }; - o.write = function(section_id, value) { - uci.unset('firewall', section_id, 'extra'); - uci.set('firewall', section_id, 'extra_dest', value); - }; + if (!L.hasSystemFeature('firewall4')) { + o = s.taboption('extra', form.DummyValue, '_extrainfo'); + o.rawhtml = true; + o.modalonly = true; + o.cfgvalue = function(section_id) { + return _('Passing raw iptables arguments to source and destination traffic classification rules allows to match packets based on other criteria than interfaces or subnets. These options should be used with extreme care as invalid values could render the firewall ruleset broken, completely exposing all services.'); + }; + + o = s.taboption('extra', form.Value, 'extra_src', _('Extra source arguments'), _('Additional raw <em>iptables</em> arguments to classify zone source traffic, e.g. <code>-p tcp --sport 443</code> to only match inbound HTTPS traffic.')); + o.modalonly = true; + o.cfgvalue = function(section_id) { + return uci.get('firewall', section_id, 'extra_src') || uci.get('firewall', section_id, 'extra'); + }; + o.write = function(section_id, value) { + uci.unset('firewall', section_id, 'extra'); + uci.set('firewall', section_id, 'extra_src', value); + }; + + o = s.taboption('extra', form.Value, 'extra_dest', _('Extra destination arguments'), _('Additional raw <em>iptables</em> arguments to classify zone destination traffic, e.g. <code>-p tcp --dport 443</code> to only match outbound HTTPS traffic.')); + o.modalonly = true; + o.cfgvalue = function(section_id) { + return uci.get('firewall', section_id, 'extra_dest') || uci.get('firewall', section_id, 'extra_src') || uci.get('firewall', section_id, 'extra'); + }; + o.write = function(section_id, value) { + uci.unset('firewall', section_id, 'extra'); + uci.set('firewall', section_id, 'extra_dest', value); + }; + } o = s.taboption('general', form.DummyValue, '_forwardinfo'); o.rawhtml = true; |