summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-03-26 19:14:47 +0100
committerJo-Philipp Wich <jo@mein.io>2020-03-26 19:15:27 +0100
commit0ff4dc822b62bdc4abc925a2d1a6b8641defa98a (patch)
treed5b13208a536799e4fd2bdc72be0d13ecb84b12d /applications/luci-app-firewall
parent4c55e8226d7d6808ad7aa7d9a420dfda628a89f0 (diff)
luci-app-firewall: use Firewall.removeZone() helper
Fixes: FS#2932 Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2932 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-firewall')
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js6
1 files changed, 6 insertions, 0 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 fe9ef75c5..85c126d7a 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
@@ -82,6 +82,12 @@ return L.view.extend({
s.anonymous = true;
s.sortable = true;
+ s.handleRemove = function(section_id, ev) {
+ return firewall.deleteZone(section_id).then(L.bind(function() {
+ return this.super('handleRemove', [section_id, ev]);
+ }, this));
+ };
+
s.tab('general', _('General Settings'));
s.tab('advanced', _('Advanced Settings'));
s.tab('conntrack', _('Conntrack Settings'));