From dbd1fe38460e8e8919e79e0e5b237345e2d17b64 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Thu, 26 May 2022 12:07:55 +0200 Subject: [PATCH] corrected domain-formfields visibility flag for ssl-related settings Signed-off-by: Michael Kaufmann --- lib/formfields/admin/domains/formfield.domains_add.php | 3 ++- lib/formfields/admin/domains/formfield.domains_edit.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/formfields/admin/domains/formfield.domains_add.php b/lib/formfields/admin/domains/formfield.domains_add.php index 37cfc39e..1999b9ce 100644 --- a/lib/formfields/admin/domains/formfield.domains_add.php +++ b/lib/formfields/admin/domains/formfield.domains_add.php @@ -207,6 +207,7 @@ return [ 'value' => lng('panel.nosslipsavailable') ], 'ssl_ipandport' => [ + 'visible' => !empty($ssl_ipsandports), 'label' => lng('domains.ipandport_ssl_multi.title'), 'desc' => lng('domains.ipandport_multi.description'), 'type' => 'checkbox', @@ -303,7 +304,7 @@ return [ 'checked' => false ], 'hsts_maxage' => [ - 'visible' => $ssl_ipsandports != '', + 'visible' => !empty($ssl_ipsandports), 'label' => lng('admin.domain_hsts_maxage.title'), 'desc' => lng('admin.domain_hsts_maxage.description'), 'type' => 'number', diff --git a/lib/formfields/admin/domains/formfield.domains_edit.php b/lib/formfields/admin/domains/formfield.domains_edit.php index ea1c72bc..61e0daa1 100644 --- a/lib/formfields/admin/domains/formfield.domains_edit.php +++ b/lib/formfields/admin/domains/formfield.domains_edit.php @@ -234,6 +234,7 @@ return [ 'value' => lng('panel.nosslipsavailable') ], 'ssl_ipandport' => [ + 'visible' => !empty($ssl_ipsandports), 'label' => lng('domains.ipandport_ssl_multi.title'), 'desc' => lng('domains.ipandport_multi.description'), 'type' => 'checkbox', @@ -313,7 +314,7 @@ return [ 'value' => !empty($result['tlsv13_cipher_list']) ? $result['tlsv13_cipher_list'] : Settings::Get('system.tlsv13_cipher_list') ], 'ssl_specialsettings' => [ - 'visible' => $userinfo['change_serversettings'] == '1', + 'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1', 'label' => lng('admin.ownsslvhostsettings'), 'desc' => lng('serversettings.default_vhostconf.description'), 'type' => 'textarea', @@ -322,6 +323,7 @@ return [ 'value' => $result['ssl_specialsettings'] ], 'include_specialsettings' => [ + 'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1', 'label' => lng('serversettings.includedefault_sslvhostconf'), 'type' => 'checkbox', 'value' => '1',