*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -502,10 +500,13 @@ class InterfaceTicketEmail extends DolibarrTriggers
}
$message_customer .= ''.$langs->trans('Message').' :
'.$message.'
';
- $url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/', 2)).'view.php?track_id='.$object->track_id;
-
- $message_customer .= ''.$langs->trans($see_ticket).' : '.$url_public_ticket.'
';
- $message_customer .= ''.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'
';
+ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
+ $url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/', 2)).'view.php?track_id='.((int) $object->track_id);
+ $message_customer .= ''.$langs->trans($see_ticket).' : '.$url_public_ticket.'
';
+ $message_customer .= ''.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'
';
+ } else {
+ $message_customer .= ''.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmailNoInterface').'
';
+ }
$from = (getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' ' : '').'<' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index d931c854afb..850375d0ed6 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -474,10 +474,15 @@ if (empty($reshook)) {
setEventMessages($mesg, null, 'mesgs');
} else {
$langs->load("other");
- if ($mailfile->error) {
+ if (!empty($mailfile->error) || !empty($mailfile->errors)) {
$mesg = '';
- $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo);
- $mesg .= '
'.$mailfile->error;
+ $mesg .= $langs->transnoentities('ErrorFailedToSendMail', dol_escape_htmltag($emailFrom), dol_escape_htmltag($emailTo));
+ if (!empty($mailfile->error)) {
+ $mesg .= '
' . $mailfile->error;
+ }
+ if (!empty($mailfile->errors) && is_array($mailfile->errors)) {
+ $mesg .= '
' . implode('
', $mailfile->errors);
+ }
setEventMessages($mesg, null, 'errors');
} else {
setEventMessages('No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS', null, 'warnings');
@@ -1553,7 +1558,7 @@ if ($action == 'create') {
print $form->buttonsSaveCancel("AddTrip");
print '';
-} elseif ($id > 0 || $ref) {
+} elseif ($object->id > 0) {
$userauthor = null;
$result = $object->fetch($id, $ref);
@@ -2608,12 +2613,12 @@ if ($action == 'create') {
// Select VAT
print '';
- $defaultvat = -1;
+ $defaultvat = '';
if (getDolGlobalString('EXPENSEREPORT_NO_DEFAULT_VAT')) {
// If option to have no default VAT on expense report is on, we force MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS
$conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
}
- print $form->load_tva('vatrate', (!empty($vatrate) ? $vatrate : $defaultvat), $mysoc, null, 0, 0, '', false, 1);
+ print $form->load_tva('vatrate', (!empty($vatrate) ? $vatrate : $defaultvat), null, null, 0, 0, '', false, 1);
print ' | ';
// Unit price net
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index 39b8ff61ce6..85bdd4c2bba 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -285,6 +285,7 @@ TicketNewEmailBodyInfosTrackUrl=You can view the progress of the ticket by click
TicketNewEmailBodyInfosTrackUrlCustomer=You can view the progress of the ticket in the public ticket portal by clicking the following link
TicketCloseEmailBodyInfosTrackUrlCustomer=You can consult the history of this ticket by clicking the following link
TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this email! Use the link to reply into the interface.
+TicketEmailPleaseDoNotReplyToThisEmailNoInterface=Please do not reply directly to this email!
TicketPublicInfoCreateTicket=This form allows you to record a support ticket in our management system.
TicketPublicPleaseBeAccuratelyDescribe=Please accurately describe your request. Provide the most information possible to allow us to correctly identify your request.
TicketPublicMsgViewLogIn=Please enter ticket tracking ID
diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang
index 317bca11008..c025424a933 100644
--- a/htdocs/langs/fr_FR/ticket.lang
+++ b/htdocs/langs/fr_FR/ticket.lang
@@ -265,6 +265,7 @@ TicketLogAssignedTo=Ticket %s assigné à %s
TicketLogPropertyChanged=Ticket %s modifié: classification de %s à %s
TicketLogClosedBy=Ticket %s clôt par %s
TicketLogReopen=Ticket %s ré-ouvert
+
# Public pages
TicketSystem=Gestionnaire de tickets
ShowListTicketWithTrackId=Afficher la liste des tickets à partir de l'ID de suivi
@@ -283,6 +284,7 @@ TicketNewEmailBodyInfosTrackUrl=Vous pouvez voir la progression du ticket en cli
TicketNewEmailBodyInfosTrackUrlCustomer=Vous pouvez visualiser la progression du ticket dans l'interface publique en cliquant sur le lien suivant
TicketCloseEmailBodyInfosTrackUrlCustomer=Vous pouvez consulter l'historique de ce ticket en cliquant sur le lien suivant
TicketEmailPleaseDoNotReplyToThisEmail=Merci de ne pas répondre directement à ce courriel ! Utilisez le lien pour répondre via l'interface.
+TicketEmailPleaseDoNotReplyToThisEmailNoInterface=Merci de ne pas répondre directement à ce courriel !
TicketPublicInfoCreateTicket=Ce formulaire vous permet d'enregistrer un ticket dans notre système de gestion.
TicketPublicPleaseBeAccuratelyDescribe=Veuillez décrire précisément votre question. Fournissez le plus d'informations possible pour nous permettre d'identifier correctement votre demande.
TicketPublicMsgViewLogIn=Merci d'entrer le code de suivi du ticket