* #37167 [TicketAdmin] add: notification ticket_create email template config * #37167 [Lang] add: langs trans
This commit is contained in:
parent
7786bfcd0a
commit
da1ea959cb
3 changed files with 41 additions and 0 deletions
|
|
@ -231,6 +231,17 @@ if ($action == 'updateMask') {
|
|||
$error++;
|
||||
}
|
||||
|
||||
$notification_email_template = GETPOST('TICKET_NOTIFICATION_EMAIL_TEMPLATE', 'alpha');
|
||||
$notification_email_template_description = 'Template email for ticket create notification';
|
||||
if (!empty($notification_email_to)) {
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TEMPLATE', $notification_email_template, 'chaine', 0, $notification_email_template_description, $conf->entity);
|
||||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TEMPLATE', '', 'chaine', 0, $notification_email_template_description, $conf->entity);
|
||||
}
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'restricthtml');
|
||||
$mail_intro_description = "Introduction text of ticket replies sent from Dolibarr";
|
||||
if (!empty($mail_intro)) {
|
||||
|
|
@ -699,6 +710,32 @@ print $formcategory->textwithpicto('', $langs->trans("TicketEmailNotificationToH
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
|
||||
$formmail->fetchAllEMailTemplate('ticket_send', $user, null, -1); // We set lang=null to get in priority record with no lang
|
||||
$arrayofmessagename = array();
|
||||
if (is_array($formmail->lines_model)) {
|
||||
foreach ($formmail->lines_model as $modelmail) {
|
||||
//var_dump($modelmail);
|
||||
$moreonlabel = '';
|
||||
if (!empty($arrayofmessagename[$modelmail->label])) {
|
||||
$moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
|
||||
}
|
||||
// The 'label' is the key that is unique if we exclude the language
|
||||
$arrayofmessagename[$modelmail->label.':ticket_send'] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel;
|
||||
}
|
||||
}
|
||||
|
||||
// Email template for notification of TICKET_CREATE
|
||||
print '<tr class="oddeven"><td><label for="TICKET_NOTIFICATION_EMAIL_TEMPLATE" class="block">'.$langs->trans('TicketEmailNotificationTemplate').'</label></td>';
|
||||
print '<td class="left">';
|
||||
print $form->selectarray('TICKET_NOTIFICATION_EMAIL_TEMPLATE', $arrayofmessagename, getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TEMPLATE'), 'None', 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans('TicketEmailNotificationTemplateHelp'), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Check "Notify thirdparty" by default on ticket creation
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAutoCheckNotifyThirdParty").'</td>';
|
||||
print '<td class="left">';
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ TicketEmailNotificationReplyTo=E-mail that must appears to recipient as the send
|
|||
TicketEmailNotificationReplyToHelp=Sender e-mail to use as the Reply-To to send the notification emails for tickets creation or message addition. If defined, this is the email that the recipient will reply to instead of the From. For example: support@example.com
|
||||
TicketEmailNotificationTo=Notify ticket creation to this e-mail address
|
||||
TicketEmailNotificationToHelp=If present, this e-mail address will be notified of a ticket creation (in addition to any other default recipients)
|
||||
TicketEmailNotificationTemplate=Ticket email notification template
|
||||
TicketEmailNotificationTemplateHelp=If defined, this email template will be used for ticket notifications (creation, updates, etc.) instead of the default template.
|
||||
TicketNewEmailBodyLabel=Text message sent after creating a ticket
|
||||
TicketNewEmailBodyHelp=The text specified here will be inserted into the email confirming the creation of a new ticket from the public interface. Information on the consultation of the ticket are automatically added.
|
||||
TicketParamPublicInterface=Public interface setup
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ TicketEmailNotificationReplyTo=E-mail qui doit apparaître au destinataire comme
|
|||
TicketEmailNotificationReplyToHelp=Adresse e-mail de l'expéditeur à utiliser comme adresse de réponse pour l'envoi des notifications de création ou d'ajout de message tickets. Si cette adresse est définie, le destinataire répondra à cette adresse plutôt qu'à l'adresse de l'expéditeur. Par exemple : support@exemple.com
|
||||
TicketEmailNotificationTo=Notifier la création du ticket à cette adresse e-mail
|
||||
TicketEmailNotificationToHelp=Si elle est présente, cette adresse e-mail sera notifiée de la création d'un ticket (en plus de tous les autres destinataires par défaut)
|
||||
TicketEmailNotificationTemplate=Modèle d'e-mail pour la notification de ticket
|
||||
TicketEmailNotificationTemplateHelp=Si défini, ce modèle d'e-mail sera utilisé pour les notifications liées aux tickets (création, mise à jour, etc.) à la place du modèle par défaut.
|
||||
TicketNewEmailBodyLabel=Texte du message envoyé après la création d'un ticket
|
||||
TicketNewEmailBodyHelp=Le texte spécifié ici sera inséré dans l'e-mail confirmant la création d'un nouveau ticket depuis l'interface publique. Les informations sur la consultation du ticket sont automatiquement ajoutées.
|
||||
TicketParamPublicInterface=Configuration de l'interface publique\n
|
||||
|
|
|
|||
Loading…
Reference in a new issue