summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-01-13 10:46:39 +0100
committerFlorian Eckert <fe@dev.tdt.de>2021-01-13 12:33:29 +0100
commitab390cf94eef0fa0d5278073e5fffaecb9722f82 (patch)
tree1ef4a7960cee8fa024c4e8f3e28f55e3c2a86526 /applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall
parent4bbf6db9d9909d1cc1105d39bfbabaa1cb897b87 (diff)
luci-app-firewall: add tooltip on rules that have time restrictions enabled
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall')
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js12
1 files changed, 12 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;