From 249130c17b172001b8de863fed3f953f1ffce778 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 25 Aug 2023 16:41:12 +0000 Subject: [PATCH] Bug 34616: Move default server info outside the
Also DRY current default information dialog block Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart --- .../prog/en/modules/admin/smtp_servers.tt | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt index 779434cb1b8..1c692657912 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt @@ -146,6 +146,9 @@ [% IF op == 'edit_form' %]

Edit SMTP server

+ [% UNLESS smtp_server.is_default %] + [% PROCESS default_server_info %] + [% END %]
@@ -226,19 +229,6 @@ [% END %] Sets this SMTP server as the default SMTP server. - [% UNLESS smtp_server.is_default %] -
-

Current default configuration:

- -
    -
  • Host: [%- default_config.host | html -%]
  • -
  • Port: [%- default_config.port | html -%]
  • -
  • Timeout (secs): [%- default_config.timeout | html -%]
  • -
  • SSL: [%- IF default_config.ssl_mode == 'disabled' -%]Disabled[%- ELSIF default_config.ssl_mode == 'ssl' -%]SSL[%- ELSE -%]STARTTLS[%- END -%]
  • -
  • Debug mode: [%- IF default_config.debug -%]Yes[%- ELSE -%]No[%- END -%]
  • -
-
- [% END %]
@@ -256,17 +246,7 @@

SMTP servers

-
-

Default configuration:

- -
    -
  • Host: [%- default_config.host | html -%]
  • -
  • Port: [%- default_config.port | html -%]
  • -
  • Timeout (secs): [%- default_config.timeout | html -%]
  • -
  • SSL: [%- IF default_config.ssl_mode == 'disabled' -%]Disabled[%- ELSIF default_config.ssl_mode == 'ssl' -%]SSL[%- ELSE -%]STARTTLS[%- END -%]
  • -
  • Debug mode: [%- IF default_config.debug -%]Yes[%- ELSE -%]No[%- END -%]
  • -
-
+ [% PROCESS default_server_info %] [% IF servers_count > 0 %]
@@ -489,4 +469,18 @@ [% END %] +[% BLOCK default_server_info %] +
+

Current default configuration:

+ +
    +
  • Host: [%- default_config.host | html -%]
  • +
  • Port: [%- default_config.port | html -%]
  • +
  • Timeout (secs): [%- default_config.timeout | html -%]
  • +
  • SSL: [%- IF default_config.ssl_mode == 'disabled' -%]Disabled[%- ELSIF default_config.ssl_mode == 'ssl' -%]SSL[%- ELSE -%]STARTTLS[%- END -%]
  • +
  • Debug mode: [%- IF default_config.debug -%]Yes[%- ELSE -%]No[%- END -%]
  • +
+
+[% END %] + [% INCLUDE 'intranet-bottom.inc' %] -- 2.25.1