diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php
index ef5887c58ac..9cebbc3b36d 100644
--- a/htdocs/admin/ticket.php
+++ b/htdocs/admin/ticket.php
@@ -664,28 +664,30 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
print '';
}
-// Texte d'introduction
-$mail_intro = $conf->global->TICKET_MESSAGE_MAIL_INTRO ? $conf->global->TICKET_MESSAGE_MAIL_INTRO : $langs->trans('TicketMessageMailIntroText');
-print '
'.$langs->trans("TicketMessageMailIntroLabelAdmin");
+// Message header
+//$mail_intro = getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'));
+$mail_intro = getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO', '');
+print ' '.$langs->trans("TicketMessageMailIntro");
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
-$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
+$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 90, 'dolibarr_mailings', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
$doleditor->Create();
print ' ';
print '';
print $formcategory->textwithpicto('', $langs->trans("TicketMessageMailIntroHelpAdmin"), 1, 'help');
print ' ';
-// Texte de signature
-$mail_signature = $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE ? $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE : $langs->trans('TicketMessageMailSignatureText');
-print ''.$langs->trans("TicketMessageMailSignatureLabelAdmin").'';
+// Message footer
+//$mail_signature = getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailFooterText'));
+$mail_signature = getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE');
+print ' '.$langs->trans("TicketMessageMailFooter").'';
print ' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
-$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
+$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 90, 'dolibarr_mailings', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
$doleditor->Create();
print ' ';
print '';
-print $formcategory->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelpAdmin"), 1, 'help');
+print $formcategory->textwithpicto('', $langs->trans("TicketMessageMailFooterHelpAdmin"), 1, 'help');
print ' ';
print '';
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index cfc066c4295..7cb3bdf58de 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -1071,7 +1071,7 @@ class FormTicket
console.log("We select a new value into combo child_id="+child_id);
- // Hide all selected box that are child of the one modified
+ // Hide all selected box that are child of the one modified
$(".groupticketchild").each(function(){
if ($(this).attr("child_id") > child_id) {
console.log("hide child_id="+$(this).attr("child_id"));
@@ -1080,7 +1080,7 @@ class FormTicket
}
})
- // Now we enable the next combo
+ // Now we enable the next combo
$("#'.$htmlname.'_child_'.$levelid.'").val("");
if (!arraynotparents.includes($(this).val()) && $("#'.$htmlname.'_child_'.$levelid.' option").length > 1) {
console.log($("#'.$htmlname.'_child_'.$levelid.' option").length);
@@ -1230,7 +1230,11 @@ class FormTicket
dol_delete_dir_recursive($upload_dir);
}
- $keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id; // track_id instead of trackid
+ if (!empty($this->trackid)) { // TODO Always use trackid (ticXXX) instead of track_id (abcd123)
+ $keytoavoidconflict = '-'.$this->trackid;
+ } else {
+ $keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id;
+ }
unset($_SESSION["listofpaths".$keytoavoidconflict]);
unset($_SESSION["listofnames".$keytoavoidconflict]);
unset($_SESSION["listofmimes".$keytoavoidconflict]);
@@ -1278,7 +1282,7 @@ class FormTicket
if ($this->param['models'] != 'none') {
$model_id = 0;
if (array_key_exists('models_id', $this->param)) {
- $model_id = $this->param["models_id"];
+ $model_id = (int) $this->param["models_id"];
}
$arraydefaultmessage = $formmail->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id); // If $model_id is empty, preselect the first one
@@ -1288,8 +1292,13 @@ class FormTicket
$listofpaths = array();
$listofnames = array();
$listofmimes = array();
- $keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id; // track_id instead of trackid
+ if (!empty($this->trackid)) {
+ $keytoavoidconflict = '-'.$this->trackid;
+ } else {
+ $keytoavoidconflict = empty($this->track_id) ? '' : '-'.$this->track_id; // track_id instead of trackid
+ }
+//var_dump($keytoavoidconflict);
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) {
if (!empty($arraydefaultmessage->joinfiles) && is_array($this->param['fileinit'])) {
foreach ($this->param['fileinit'] as $file) {
@@ -1297,7 +1306,8 @@ class FormTicket
}
}
}
-
+//var_dump($_SESSION);
+//var_dump($_SESSION["listofpaths".$keytoavoidconflict]);
if (!empty($_SESSION["listofpaths".$keytoavoidconflict])) {
$listofpaths = explode(';', $_SESSION["listofpaths".$keytoavoidconflict]);
}
@@ -1368,6 +1378,7 @@ class FormTicket
print ' ';
print ' ';
print ' ';
+ print ' ';
foreach ($this->param as $key => $value) {
print ' ';
}
@@ -1395,6 +1406,16 @@ class FormTicket
$ticketstat = new Ticket($this->db);
$res = $ticketstat->fetch('', '', $this->track_id);
+ // Private message (not visible by customer/external user)
+ if (!$user->socid) {
+ print '';
+ $checkbox_selected = (GETPOST('private_message', 'alpha') == "1" ? ' checked' : '');
+ print ' ';
+ print ''.$langs->trans('MarkMessageAsPrivate').' ';
+ print ' '.$form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help');
+ print ' ';
+ }
+
print '';
$checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ($conf->global->TICKETS_MESSAGE_FORCE_MAIL?'checked':''));
print ' ';
@@ -1413,16 +1434,6 @@ class FormTicket
print ' ';
}
- // Private message (not visible by customer/external user)
- if (!$user->socid) {
- print '';
- $checkbox_selected = (GETPOST('private_message', 'alpha') == "1" ? ' checked' : '');
- print ' ';
- print ''.$langs->trans('MarkMessageAsPrivate').' ';
- print ' '.$form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help');
- print ' ';
- }
-
// Subject
print ''.$langs->trans('Subject').' ';
print ' ref.'] '.$langs->trans('TicketNewMessage').'" />';
@@ -1478,7 +1489,8 @@ class FormTicket
// Intro
// External users can't send message email
- if ($user->rights->ticket->write && !$user->socid) {
+ /*
+ if ($user->rights->ticket->write && !$user->socid && !empty($conf->global->TICKET_MESSAGE_MAIL_INTRO)) {
$mail_intro = GETPOST('mail_intro') ? GETPOST('mail_intro') : $conf->global->TICKET_MESSAGE_MAIL_INTRO;
print '';
print $form->textwithpicto($langs->trans("TicketMessageMailIntro"), $langs->trans("TicketMessageMailIntroHelp"), 1, 'help');
@@ -1492,6 +1504,44 @@ class FormTicket
$doleditor->Create();
print ' ';
}
+ */
+
+ // Attached files
+ if (!empty($this->withfile)) {
+ $out = '';
+ $out .= ''.$langs->trans("MailFile").' ';
+ $out .= '';
+ // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
+ $out .= ' '."\n";
+ $out .= ''."\n";
+
+ if (count($listofpaths)) {
+ foreach ($listofpaths as $key => $val) {
+ $out .= '';
+ $out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
+ if (!$this->withfilereadonly) {
+ $out .= ' ';
+ }
+ $out .= '
';
+ }
+ } else {
+ //$out .= $langs->trans("NoAttachedFiles").' ';
+ }
+ if ($this->withfile == 2) { // Can add other files
+ $out .= ' ';
+ $out .= ' ';
+ $out .= ' ';
+ }
+ $out .= " \n";
+
+ print $out;
+ }
// MESSAGE
@@ -1516,11 +1566,24 @@ class FormTicket
$defaultmessage = preg_replace("/^\n+/", "", $defaultmessage);
}
- print ''.$langs->trans("Message").' ';
+ print ''.$langs->trans("Message").' ';
if ($user->rights->ticket->write && !$user->socid) {
- print $form->textwithpicto('', $langs->trans("TicketMessageHelp"), 1, 'help');
+ $texttooltip = $langs->trans("TicketMessageHelp");
+ if (getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO') || getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE')) {
+ $texttooltip .= ' '.$langs->trans("ForEmailMessageWillBeCompletedWith").'...';
+ }
+ if (getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO')) {
+ $texttooltip .= ''.$langs->trans("TicketMessageMailIntro").' '.getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO');
+ }
+ if (getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE')) {
+ $texttooltip .= ''.$langs->trans("TicketMessageMailFooter").' '.getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE');
+ }
+ print $form->textwithpicto('', $texttooltip, 1, 'help');
}
- print '';
+ print ' ';
+
+
+ print '';
//$toolbarname = 'dolibarr_details';
$toolbarname = 'dolibarr_notes';
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -1528,54 +1591,19 @@ class FormTicket
$doleditor->Create();
print ' ';
- // Signature
+ // Footer
// External users can't send message email
- if ($user->rights->ticket->write && !$user->socid) {
+ /*if ($user->rights->ticket->write && !$user->socid && !empty($conf->global->TICKET_MESSAGE_MAIL_SIGNATURE)) {
$mail_signature = GETPOST('mail_signature') ? GETPOST('mail_signature') : $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE;
- print ''.$langs->trans("TicketMessageMailSignature").' ';
- print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelp"), 1, 'help');
+ print ''.$langs->trans("TicketMessageMailFooter").' ';
+ print $form->textwithpicto('', $langs->trans("TicketMessageMailFooterHelp"), 1, 'help');
print '';
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('mail_signature', $mail_signature, '100%', 150, 'dolibarr_details', '', false, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_2, 70);
+ $doleditor = new DolEditor('mail_signature', $mail_signature, '100%', 90, 'dolibarr_details', '', false, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_2, 70);
$doleditor->Create();
print ' ';
}
-
- // Attached files
- if (!empty($this->withfile)) {
- $out = '';
- $out .= ''.$langs->trans("MailFile").' ';
- $out .= '';
- // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
- $out .= ' '."\n";
- $out .= ''."\n";
- if (count($listofpaths)) {
- foreach ($listofpaths as $key => $val) {
- $out .= '';
- $out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
- if (!$this->withfilereadonly) {
- $out .= ' ';
- }
- $out .= '
';
- }
- } else {
- $out .= $langs->trans("NoAttachedFiles").' ';
- }
- if ($this->withfile == 2) { // Can add other files
- $out .= ' ';
- $out .= ' ';
- $out .= ' ';
- }
- $out .= " \n";
-
- print $out;
- }
+ */
print '';
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index af52c1279e5..f34398abc4b 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -104,7 +104,7 @@ class modTicket extends DolibarrModules
// List of particular constants to add when module is enabled
// (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
// Example:
- $default_signature = $langs->trans('TicketMessageMailSignatureText', getDolGlobalString('MAIN_INFO_SOCIETE_NOM'));
+ $default_footer = $langs->trans('TicketMessageMailFooterText', getDolGlobalString('MAIN_INFO_SOCIETE_NOM'));
$this->const = array(
1 => array('TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '0', 'Enable ticket public interface', 0),
2 => array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module', 0),
@@ -116,7 +116,7 @@ class modTicket extends DolibarrModules
8 => array('TICKET_PRODUCT_CATEGORY', 'chaine', 0, 'The category of product that is being used for ticket accounting', 0),
9 => array('TICKET_NOTIFICATION_EMAIL_FROM', 'chaine', getDolGlobalString('MAIN_MAIL_EMAIL_FROM'), 'Email to use by default as sender for messages sent from Dolibarr', 0),
10 => array('TICKET_MESSAGE_MAIL_INTRO', 'chaine', $langs->trans('TicketMessageMailIntroText'), 'Introduction text of ticket replies sent from Dolibarr', 0),
- 11 => array('TICKET_MESSAGE_MAIL_SIGNATURE', 'chaine', $default_signature, 'Signature to use by default for messages sent from Dolibarr', 0),
+ 11 => array('TICKET_MESSAGE_MAIL_SIGNATURE', 'chaine', $default_footer, 'Signature to use by default for messages sent from Dolibarr', 0),
12 => array('MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER', 'chaine', "1", 'Disable the rendering of headers in tickets', 0),
13 => array('MAIN_SECURITY_ENABLECAPTCHA_TICKET', 'chaine', getDolGlobalInt('MAIN_SECURITY_ENABLECAPTCHA_TICKET'), 'Enable captcha code by default', 0)
);
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index 1fe2e5b8a6e..3e917cc460d 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -221,18 +221,17 @@ SendMessageByEmail=Send message by email
TicketNewMessage=New message
ErrorMailRecipientIsEmptyForSendTicketMessage=Recipient is empty. No email send
TicketGoIntoContactTab=Please go into "Contacts" tab to select them
-TicketMessageMailIntro=Introduction
+TicketMessageMailIntro=Message header
TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved.
-TicketMessageMailIntroLabelAdmin=Introduction text to all ticket answers
TicketMessageMailIntroText=Hello, A new answer has been added to a ticket that you follow. Here is the message:
TicketMessageMailIntroHelpAdmin=This text will be inserted before the answer when replying to a ticket from Dolibarr
-TicketMessageMailSignature=Signature
-TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved.
-TicketMessageMailSignatureText=Message sent by %s via Dolibarr
-TicketMessageMailSignatureLabelAdmin=Signature of response email
-TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message.
+TicketMessageMailFooter=Message footer
+TicketMessageMailFooterHelp=This text is added only at the end of the message sent by email and will not be saved.
+TicketMessageMailFooterText=Message sent by %s via Dolibarr
+TicketMessageMailFooterHelpAdmin=This text will be inserted after the response message.
TicketMessageHelp=Only this text will be saved in the message list on ticket card.
TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values.
+ForEmailMessageWillBeCompletedWith=For email messages sent to external users, the message will be completed with
TimeElapsedSince=Time elapsed since
TicketTimeToRead=Time elapsed before read
TicketTimeElapsedBeforeSince=Time elapsed before / since
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 4981aec624e..d899f8e878c 100755
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -437,7 +437,8 @@ if (empty($reshook)) {
$action = 'view';
}
- // Action to add an action (not a message)
+ // Action to add an action (not a message).
+ // This may also send an email (concatenated with email_intro and email footer if checkbox was selected)
if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $user->rights->ticket->read) {
$ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "on" ? 1 : 0));
@@ -594,7 +595,6 @@ if (empty($reshook)) {
exit();
}
} elseif ($action == "set_message" && $user->rights->ticket->manage) {
- // altairis: manage cancel button
if (!GETPOST('cancel')) {
$object->fetch('', '', GETPOST('track_id', 'alpha'));
$oldvalue_message = $object->message;
@@ -689,7 +689,7 @@ if (empty($reshook)) {
$upload_dir = $conf->ticket->dir_output;
$permissiontoadd = $user->rights->ticket->write;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
-
+//var_dump($action);exit;
// Actions to send emails
$triggersendname = 'TICKET_SENTBYMAIL';
$paramname = 'id';
@@ -736,6 +736,7 @@ if ($action == 'create' || $action == 'presend') {
$formticket->withfile = 2;
$formticket->withextrafields = 1;
$formticket->param = array('origin' => GETPOST('origin'), 'originid' => GETPOST('originid'));
+ $formticket->trackid = 'tic'.$object->id;
$formticket->withcancel = 1;
@@ -862,9 +863,6 @@ if ($action == 'create' || $action == 'presend') {
print dol_get_fiche_head($head, 'ticket', $langs->trans("Project"), 0, ($projectstat->public ? 'projectpub' : 'project'));
- /*
- * Projet synthese pour rappel
- */
print '';
$linkback = ''.$langs->trans("BackToList").' ';
@@ -1156,6 +1154,7 @@ if ($action == 'create' || $action == 'presend') {
print ' ';
print ' ';
print ' ';
+ print ' ';
print '
';
@@ -1507,6 +1506,7 @@ if ($action == 'create' || $action == 'presend') {
$formticket->track_id = $object->track_id;
$formticket->ref = $object->ref;
$formticket->id = $object->id;
+ $formticket->trackid = 'tic'.$object->id;
$formticket->withfile = 2;
$formticket->withcancel = 1;
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index 7242fdafa28..42ffa662246 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -2495,7 +2495,8 @@ class Ticket extends CommonObject
}
/**
- * Add new message on a ticket (private/public area). Can also send it be email if GETPOST('send_email', 'int') is set.
+ * Add new message on a ticket (private/public area).
+ * Can also send it be email if GETPOST('send_email', 'int') is set. For such email, header and footer is added.
*
* @param User $user User for action
* @param string $action Action string
@@ -2556,11 +2557,10 @@ class Ticket extends CommonObject
//var_dump($_SESSION);
//var_dump($listofpaths);exit;
- /*
- * Public area
- */
if (!empty($public_area)) {
/*
+ * Message created fromthe Public interface
+ *
* Send emails to assigned users (public area notification)
*/
if (!empty($conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ENABLED)) {
@@ -2629,9 +2629,8 @@ class Ticket extends CommonObject
}
} else {
/*
- * Private area
- */
- /*
+ * Send from Backoffice / Private area
+ *
* Send emails to internal users (linked contacts)
*/
if ($send_email > 0) {
@@ -2645,7 +2644,7 @@ class Ticket extends CommonObject
$subject = GETPOST('subject', 'alphanohtml') ? GETPOST('subject', 'alphanohtml') : '['.$label_title.'- ticket #'.$object->track_id.'] '.$langs->trans('TicketNewMessage');
$message_intro = $langs->trans('TicketNotificationEmailBody', "#".$object->id);
- $message_signature = GETPOST('mail_signature') ? GETPOST('mail_signature') : $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE;
+ $message_signature = GETPOST('mail_signature') ? GETPOST('mail_signature') : getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE');
$message = $langs->trans('TicketMessageMailIntroText');
$message .= ' ';
@@ -2683,7 +2682,7 @@ class Ticket extends CommonObject
// URL ticket
$url_internal_ticket = dol_buildpath('/ticket/card.php', 2).'?track_id='.$object->track_id;
- // altairis: make html link on url
+ // add html link on url
$message .= ' '.$langs->trans('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.$object->track_id.' ';
// Add global email address recipient
@@ -2693,7 +2692,7 @@ class Ticket extends CommonObject
}
}
- // altairis: dont try to send email if no recipient
+ // dont try to send email if no recipient
if (!empty($sendto)) {
$this->sendTicketMessageByEmail($subject, $message, '', $sendto, $listofpaths, $listofmimes, $listofnames);
}
@@ -2724,8 +2723,8 @@ class Ticket extends CommonObject
$label_title = empty($conf->global->MAIN_APPLICATION_TITLE) ? $mysoc->name : $conf->global->MAIN_APPLICATION_TITLE;
$subject = GETPOST('subject') ? GETPOST('subject') : '['.$label_title.'- ticket #'.$object->track_id.'] '.$langs->trans('TicketNewMessage');
- $message_intro = GETPOST('mail_intro') ? GETPOST('mail_intro', 'restricthtml') : $conf->global->TICKET_MESSAGE_MAIL_INTRO;
- $message_signature = GETPOST('mail_signature') ? GETPOST('mail_signature', 'restricthtml') : $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE;
+ $message_intro = GETPOST('mail_intro') ? GETPOST('mail_intro', 'restricthtml') : getDolGlobalString('TICKET_MESSAGE_MAIL_INTRO');
+ $message_signature = GETPOST('mail_signature') ? GETPOST('mail_signature', 'restricthtml') : getDolGlobalString('TICKET_MESSAGE_MAIL_SIGNATURE');
if (!dol_textishtml($message_intro)) {
$message_intro = dol_nl2br($message_intro);
}