diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 4e6e274b25b..2c532f339c3 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -1185,4 +1185,6 @@ CommercialAffected=Sales representative affected
YourMessage=Your message
YourMessageHasBeenReceived=Your message has been received. We will answer or contact you as soon as possible.
UrlToCheck=Url to check
-Automation=Automation
\ No newline at end of file
+Automation=Automation
+CreatedByEmailCollector=Created by Email collector
+CreatedByPublicPortal=Created from Public portal
diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php
index 3d11afc5900..721ed4c4a2a 100644
--- a/htdocs/recruitment/recruitmentcandidature_card.php
+++ b/htdocs/recruitment/recruitmentcandidature_card.php
@@ -477,6 +477,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
}*/
+ // Author
+ if (!empty($object->email_msgid)) {
+ $morehtmlref .= $langs->trans("CreatedBy").' : ';
+
+ if ($object->fk_user_creat > 0) {
+ $fuser = new User($db);
+ $fuser->fetch($object->fk_user_creat);
+ $morehtmlref .= $fuser->getNomUrl(-1);
+ }
+ if (!empty($object->email_msgid)) {
+ $morehtmlref .= ' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')';
+ }
+ } /* elseif (!empty($object->origin_email)) {
+ $morehtmlref .= $langs->trans("CreatedBy").' : ';
+ $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"');
+ $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')';
+ } */
$morehtmlref .= '';
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 9638e763dba..cb7e71f8356 100755
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -925,15 +925,17 @@ if ($action == 'create' || $action == 'presend') {
if ($object->fk_user_create > 0) {
$morehtmlref .= '
'.$langs->trans("CreatedBy").' : ';
- $langs->load("users");
$fuser = new User($db);
$fuser->fetch($object->fk_user_create);
$morehtmlref .= $fuser->getNomUrl(-1);
- }
- if (!empty($object->origin_email)) {
+ } elseif (!empty($object->email_msgid)) {
$morehtmlref .= '
'.$langs->trans("CreatedBy").' : ';
$morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"');
- $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("TicketEmailOriginIssuer").')';
+ $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')';
+ } elseif (!empty($object->origin_email)) {
+ $morehtmlref .= '
'.$langs->trans("CreatedBy").' : ';
+ $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"');
+ $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')';
}
// Thirdparty
@@ -1019,6 +1021,23 @@ if ($action == 'create' || $action == 'presend') {
print ' - '.$langs->trans("TimeElapsedSince").': '.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).'';
print '';
+ // Origin
+ /*
+ if ($object->email_msgid) {
+ $texttoshow = $langs->trans("CreatedByEmailCollector");
+ } elseif ($object->origin_email) {
+ $texttoshow = $langs->trans("FromPublicEmail");
+ }
+ if ($texttoshow) {
+ print '