diff --git a/src/AuthMail.php b/src/AuthMail.php index 1a7cc8e1f15..77e3bafaf8a 100644 --- a/src/AuthMail.php +++ b/src/AuthMail.php @@ -206,10 +206,11 @@ public function showFormTestMail() if ($this->getFromDB($ID)) { $twig_params = [ - 'title' => __('Test connection to email server'), - 'login' => __('Login'), - 'password' => __('Password'), - 'test' => _x('button', 'Test'), + 'title' => __('Test connection to email server'), + 'login' => __('Login'), + 'password' => __('Password'), + 'test' => _x('button', 'Test'), + 'connect_string' => $this->fields['connect_string'] ?? '' ]; // language=Twig echo TemplateRenderer::getInstance()->renderFromStringTemplate(<< diff --git a/templates/pages/setup/authentication/mail.html.twig b/templates/pages/setup/authentication/mail.html.twig index 0ff97bfb8f1..1743ffb9ece 100644 --- a/templates/pages/setup/authentication/mail.html.twig +++ b/templates/pages/setup/authentication/mail.html.twig @@ -41,7 +41,7 @@ {% set connect_opts = call('Toolbox::parseMailServerConnectString', [item.fields['connect_string']]) %} {{ include('pages/setup/mailcollector/server_config_fields.html.twig', { 'connect_opts': connect_opts, - 'host': item.fields['connect_string'] + 'connect_string': item.fields['connect_string'] }) }} {{ fields.smallTitle(__('Email options')) }} diff --git a/templates/pages/setup/mailcollector/server_config_fields.html.twig b/templates/pages/setup/mailcollector/server_config_fields.html.twig index e08f6f105ff..b9ade450f6e 100644 --- a/templates/pages/setup/mailcollector/server_config_fields.html.twig +++ b/templates/pages/setup/mailcollector/server_config_fields.html.twig @@ -32,7 +32,6 @@ #} {% import 'components/form/fields_macros.html.twig' as fields %} -{% import 'components/form/basic_inputs_macros.html.twig' as inputs %} {{ fields.textField( 'mail_server', @@ -119,9 +118,8 @@ connection_options_fields, __('Connection options') ) }} -{{ inputs.hidden('imap_string', host) }} -{% if host is not empty %} - {{ fields.htmlField('', host, __('Connection string'), { +{% if connect_string is not empty %} + {{ fields.htmlField('', connect_string, __('Connection string'), { add_field_class: 'fw-bold' }) }} {% endif %} diff --git a/templates/pages/setup/mailcollector/setup_form.html.twig b/templates/pages/setup/mailcollector/setup_form.html.twig index 7ada5ba5371..96c05946aef 100644 --- a/templates/pages/setup/mailcollector/setup_form.html.twig +++ b/templates/pages/setup/mailcollector/setup_form.html.twig @@ -89,7 +89,7 @@ {{ include('pages/setup/mailcollector/server_config_fields.html.twig', { 'connect_opts': connect_opts, - 'host': host + 'connect_string': host }) }} {{ fields.smallTitle(__('Authentication')) }}