From 81d589e3f39551131bf5a77a0dfb26081b2bdcb8 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 30 Jan 2025 05:25:21 +0000 Subject: [PATCH] Bug 38998: Only show Edit link for DB default SMTP server Content-Type: text/plain; charset=utf-8 This change only shows the "Edit" on the smtp_servers.pl page for the "Current default configuratio" if the default configuration can be edited. That is, don't show it when config comes from the code, and do show it when the config comes from the database. Test plan: 0. Apply the patch 1. Go to /cgi-bin/koha/admin/smtp_servers.pl 2. Ensure you delete any SMTP servers you've defined 3. Note that there is no "Edit" button at the bottom of "Current default configuration" 4. Click "New SMTP server" and create a new default server 5. Go to /cgi-bin/koha/admin/smtp_servers.pl 6. Notice how now there is an "Edit" link at the bottom of "Current default configuration" Signed-off-by: Magnus Enger Followed the test plan, works as advertised. Signed-off-by: Marcel de Rooy --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6ebd2877da..24619c98fd 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 @@ -493,7 +493,7 @@
  • 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 -%]
  • - [% IF op == 'list' %] + [% IF op == 'list' && default_config.id %]
  • Edit
  • [% END %] -- 2.39.5