luci-app-firewall: repair handleAdd for rules.js
authorPaul Donald <[email protected]>
Mon, 31 Mar 2025 19:41:11 +0000 (21:41 +0200)
committerPaul Donald <[email protected]>
Mon, 31 Mar 2025 19:44:05 +0000 (21:44 +0200)
commit581fa4aecf0fde50290852a1c820a85ff8840257
tree5d747ba06cb34d6e7ced6b3403a405ee2803d5ea
parent77109ee9ffb8b2de1c195f90859ea000bd301f36
luci-app-firewall: repair handleAdd for rules.js

handleAdd did not work correctly for a while: the defaults were not
propagated, and some state was not cleaned up (try:
firewall rules -> add -> no changes -> click dismiss -> press save).

The state is now properly removed when pressing dismiss, by stashing
addedSection correctly under the map m and not in this.

Signed-off-by: Paul Donald <[email protected]>
(cherry picked from commit d356e30ac13cc1648045d8a0bcb5dd92630778f4)
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js