From: Michael Tremer Date: Sat, 26 Apr 2025 12:37:29 +0000 (+0200) Subject: wireguard.cgi: Check the first available option on add X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fba112e94900d0a64a140a7d945d7ec651ce7ae;p=people%2Fmfischer%2Fipfire-2.x.git wireguard.cgi: Check the first available option on add Signed-off-by: Michael Tremer --- 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 <