diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-01-14 18:04:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 18:04:02 +0100 |
commit | 4f3934172cd6fff4fdf9709331cd87cffadffc8b (patch) | |
tree | 127c4765cb65317f69191aaab1decff498256612 /applications/luci-app-firewall | |
parent | ab9de0784f2162e93a2fc54933a076b887ba861a (diff) | |
parent | ab390cf94eef0fa0d5278073e5fffaecb9722f82 (diff) |
Merge pull request #4667 from TDT-AG/pr/20201218-luci-base-tooltip
luci-base: add generic tooltip handling
Diffstat (limited to 'applications/luci-app-firewall')
-rw-r--r-- | applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js | 12 | ||||
-rw-r--r-- | applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js | 8 |
2 files changed, 20 insertions, 0 deletions
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 bacbbd7044..7c09eeadf6 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 @@ -236,7 +236,19 @@ return view.extend({ o.modalonly = false; o.default = o.enabled; o.editable = true; + o.tooltip = function(section_id) { + var weekdays = uci.get('firewall', section_id, 'weekdays'); + var monthdays = uci.get('firewall', section_id, 'monthdays'); + var start_time = uci.get('firewall', section_id, 'start_time'); + var stop_time = uci.get('firewall', section_id, 'stop_time'); + var start_date = uci.get('firewall', section_id, 'start_date'); + 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 null; + }; o = s.taboption('advanced', form.ListValue, 'direction', _('Match device')); 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 b2f9b81a9b..53612e0572 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 @@ -158,6 +158,14 @@ return view.extend({ o = s.taboption('general', form.Flag, 'masq', _('Masquerading')); o.editable = true; + o.tooltip = function(section_id) { + var masq_src = uci.get('firewall', section_id, 'masq_src') + var masq_dest = uci.get('firewall', section_id, 'masq_dest') + if (masq_src || masq_dest) + return _('Limited masquerading enabled'); + + return null; + }; o = s.taboption('general', form.Flag, 'mtu_fix', _('MSS clamping')); o.modalonly = true; |