luci-app-firewall: keep values in config file

add `rmempty` to keep values in config file

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
This commit is contained in:
Andy Chiang
2026-05-20 15:43:24 +07:00
committed by Paul Donald
parent 0df858d63c
commit 7de5152faf
2 changed files with 4 additions and 0 deletions
@@ -406,6 +406,7 @@ return view.extend({
o = s.taboption('general', form.ListValue, 'target', _('Action')); o = s.taboption('general', form.ListValue, 'target', _('Action'));
o.modalonly = true; o.modalonly = true;
o.default = 'ACCEPT'; o.default = 'ACCEPT';
o.rmempty = false;
o.value('DROP', _('drop')); o.value('DROP', _('drop'));
o.value('ACCEPT', _('accept')); o.value('ACCEPT', _('accept'));
o.value('REJECT', _('reject')); o.value('REJECT', _('reject'));
@@ -160,8 +160,11 @@ return view.extend({
} }
p[0].default = fwDefaults.getInput(); p[0].default = fwDefaults.getInput();
p[0].rmempty = false;
p[1].default = fwDefaults.getOutput(); p[1].default = fwDefaults.getOutput();
p[1].rmempty = false;
p[2].default = fwDefaults.getForward(); p[2].default = fwDefaults.getForward();
p[2].rmempty = false;
o = s.taboption('general', form.Flag, 'masq', _('IPv4 Masquerading'), 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.')); _('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.'));