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:42:03 +0000 (21:42 +0200)
commitaade99dd0b3f755204dd11e885660630d4720eed
tree6f9537c1aa1f893eb7f3fa755f44cf070a2c500b
parenta1b1f43d7cdb07b1aceb25578dcc735a8b8aaf70
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