From ac5e5ba62484950641dfa71e0a42a1ccc2f7fb27 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 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" --- 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 6fc48a973f..85964e4223 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 @@ -492,7 +492,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