Admin: Add configuration setting 'notifications_extended_footer_message' to add optional (extra) footer in emails

Author: @juan-cortizas-ponte
pull/4505/head
Juan Cortizas Ponte 3 years ago committed by GitHub
parent 949f8cce6c
commit ba9fe06600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      main/inc/lib/api.lib.php
  2. 6
      main/install/configuration.dist.php

@ -9480,6 +9480,16 @@ function api_mail_html(
}
}
$extendedFooterMessageConfig = api_get_configuration_value('notifications_extended_footer_message');
if ($extendedFooterMessageConfig) {
$platformLanguage = api_get_interface_language();
$extendedFooterMessage = api_get_configuration_value('notifications_extended_footer_message')[$platformLanguage];
if ($extendedFooterMessage) {
$message .= '<br /><hr><i>'.'<p>'.implode('<br/><br/>', $extendedFooterMessage['paragraphs']).'</p>';
}
}
$mailView = new Template(null, false, false, false, false, false, false);
$noReply = api_get_setting('noreply_email_address');

@ -2327,6 +2327,12 @@ INSERT INTO `extra_field` (`extra_field_type`, `field_type`, `variable`, `displa
// Add the "remember password" link to the "subscription to session" confirmation email
//$_configuration['email_template_subscription_to_session_confirmation_lost_password'] = false;
// Add a custom extra footer for notificacions emails for a specific language, for example for
// privacy policy notices. Multiple languages and paragraphs can be added.
/*$_configuration['notifications_extended_footer_message'] = ['english' => ['paragraphs' => [
'Change or delete this paragraph or add another one'
]]];*/
// KEEP THIS AT THE END
// -------- Custom DB changes
// Add user activation by confirmation email

Loading…
Cancel
Save