networks: wifi: In new connection page set form defaults properly

- When a link on 'Nearby Wi-Fi Networks' page is clicked, a new Wi-Fi connection
page is shown. In this form, the DNS-over-TLS and IPv6 method radio buttons are
not pre-selected with default value. Fix this by setting default values for
them.

Tests:

- On a system with Wi-Fi device, click on 'Nearby Wi-Fi Networks', click on a
Wi-Fi network and go to new Wi-Fi connection creation page. Notice that values
for DNS-over-TLS and IPv6 connection method are filled in. Simply clicking
'Submit' creates the connection.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2024-11-06 21:35:23 -08:00 committed by Veiko Aasa
parent 064f3c6c0c
commit 3c07d245d4
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -491,7 +491,9 @@ def add_wifi(request, ssid=None, interface_name=None):
'mode': 'infrastructure',
'band': 'auto',
'auth_mode': 'wpa',
'ipv4_method': 'auto'
'ipv4_method': 'auto',
'ipv6_method': 'auto',
'dns_over_tls': 'default',
}
if request.method == 'POST':