luci-app-firewall: keep values in config file
authorAndy Chiang <redacted>
Wed, 20 May 2026 08:43:24 +0000 (15:43 +0700)
committerPaul Donald <redacted>
Wed, 27 May 2026 11:32:38 +0000 (14:32 +0300)
add `rmempty` to keep values in config file

Signed-off-by: Andy Chiang <redacted>
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js

index 3123385224a913e769b07d71355a8eb3f974bcea..d98c5d9e8b1bdaa90df00651f29f1bf17c9a88be 100644 (file)
@@ -406,6 +406,7 @@ return view.extend({
                o = s.taboption('general', form.ListValue, 'target', _('Action'));
                o.modalonly = true;
                o.default = 'ACCEPT';
+               o.rmempty = false;
                o.value('DROP', _('drop'));
                o.value('ACCEPT', _('accept'));
                o.value('REJECT', _('reject'));
index faa40cbbc3137e0dad3f3fc5fb07b62205a7c4c1..ae78fb1867d97112bd81773d7c0fd25a1540f603 100644 (file)
@@ -160,8 +160,11 @@ return view.extend({
                }
 
                p[0].default = fwDefaults.getInput();
+               p[0].rmempty = false;
                p[1].default = fwDefaults.getOutput();
+               p[1].rmempty = false;
                p[2].default = fwDefaults.getForward();
+               p[2].rmempty = false;
 
                o = s.taboption('general', form.Flag, 'masq', _('IPv4 Masquerading'),
                        _('Enable network address and port translation IPv4 (NAT4 or NAPT4) for outbound traffic on this zone. This is typically enabled on the <em>wan</em> zone.'));
git clone https://git.99rst.org/PROJECT