From fcff03c66d68d0486a80abc0d032b2eff4f75bc9 Mon Sep 17 00:00:00 2001 From: mrozniecki Date: Mon, 18 Mar 2024 16:10:39 +0100 Subject: [PATCH] Add substitution for mail intro and signature on ticket mail --- htdocs/core/class/html.formticket.class.php | 8 ++++++-- htdocs/ticket/card.php | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 4fa8ee3eac6..471cffd2a84 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1661,10 +1661,14 @@ class FormTicket $texttooltip .= '

'.$langs->trans("ForEmailMessageWillBeCompletedWith").'...'; } if (getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO')) { - $texttooltip .= '
'.$langs->trans("TicketMessageMailIntro").'
'.getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO'); + $mail_intro = make_substitutions(getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO'), $this->substit); + print ''; + $texttooltip .= '
'.$langs->trans("TicketMessageMailIntro").'
'.$mail_intro; } if (getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE')) { - $texttooltip .= '

'.$langs->trans("TicketMessageMailFooter").'
'.getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE'); + $mail_signature = make_substitutions(getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE'), $this->substit); + print ''; + $texttooltip .= '

'.$langs->trans("TicketMessageMailFooter").'
'.$mail_signature; } print $form->textwithpicto('', $texttooltip, 1, 'help'); } diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 037ec5c57c4..db416fb7742 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1536,6 +1536,7 @@ if ($action == 'create' || $action == 'presend') { $morehtmlright = ''; $help = ""; $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, $arrayoffamiliestoexclude, $object); + complete_substitutions_array($substitutionarray, $outputlangs, $object); $morehtmlright .= $form->textwithpicto(''.$langs->trans("TicketMessageSubstitutionReplacedByGenericValues").'', $help, 1, 'helpclickable', '', 0, 3, 'helpsubstitution'); print '
';