From 9fba112e94900d0a64a140a7d945d7ec651ce7ae Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 26 Apr 2025 14:37:29 +0200 Subject: [PATCH] wireguard.cgi: Check the first available option on add Signed-off-by: Michael Tremer --- html/cgi-bin/wireguard.cgi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi index 2bef8dcde..a53016076 100644 --- a/html/cgi-bin/wireguard.cgi +++ b/html/cgi-bin/wireguard.cgi @@ -1053,18 +1053,24 @@ ADD: } } + # Check the first available option + my %checked = ( + "host" => ($disabled{"host"} eq "disabled") ? "" : "checked", + "net" => ($disabled{"host"} eq "disabled") ? "checked" : "", + ); + print <

-- 2.39.5