From 839c42b347c8919864c09a60d480e054b99447fb Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 10 Sep 2026 12:41:39 +0200 Subject: [PATCH] luci-app-strongswan-swanctl: rename startaction to start_action Update form field to match the renamed 'start_action' uci option. An empty field now defaults to 'none', matching the 'swanctl.conf'. An empty value is also not stored in the uci. While we are at it also make this vaule optional. Signed-off-by: Florian Eckert --- .../resources/view/strongswan-swanctl/swanctl.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js b/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js index d2812b730f..a205c401e0 100644 --- a/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js +++ b/applications/luci-app-strongswan-swanctl/htdocs/luci-static/resources/view/strongswan-swanctl/swanctl.js @@ -316,12 +316,14 @@ return view.extend({ o.optional = true; o.modalonly = true; - o = s.taboption('general', form.ListValue, 'startaction', _('Start Action'), + o = s.taboption('general', form.ListValue, 'start_action', _('Start Action'), _('Action on initial configuration load')); - o.value('none'); + o.value('', '%s (%s)'.format('none', _('default'))); o.value('trap'); o.value('start'); - o.default = 'trap'; + o.optional = true; + o.default = ''; + o.rmempty = true; o.modalonly = true; o = s.taboption('general', form.ListValue, 'close_action', _('Close Action'),