From f10fb4bf4366f515f0ff523e5ae0469f55edcb70 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 8 Jan 2020 10:35:52 +0100 Subject: [PATCH] dns.cgi: Always display the input field for TLS_HOSTNAME * Mark it as required if the protocol is set to TLS. Signed-off-by: Stefan Schantl --- html/cgi-bin/dns.cgi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 7d80b4eaa5..1e609eb49e 100755 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -683,6 +683,13 @@ sub show_add_edit_nameserver() { &Header::openbox('100%', 'left', $Lang::tr{'dnsforward add a new entry'}); } + my $tls_required_image; + + # If the protocol is TLS, dispaly the required image. + if ($settings{'PROTO'} eq "TLS") { + $tls_required_image = "*"; + } + # Add hidden input to store the mode. print "\n"; @@ -692,20 +699,13 @@ print <$Lang::tr{'ip address'}: * -END -; - # If the protocol is TLS, display the TLS hostname input. - if ($settings{'PROTO'} eq "TLS") { -print < - $Lang::tr{'dns tls hostname'}: * + $Lang::tr{'dns tls hostname'}: $tls_required_image -END -; - } -print < $Lang::tr{'remark'}: -- 2.39.5