From: Jo-Philipp Wich Date: Thu, 26 Mar 2020 18:14:47 +0000 (+0100) Subject: luci-app-firewall: use Firewall.removeZone() helper X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ff4dc822b62bdc4abc925a2d1a6b8641defa98a;p=oweals%2Fluci.git 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 --- 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'));