diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php
index dca93b9a506..a155e22acca 100644
--- a/htdocs/admin/emailcollector_card.php
+++ b/htdocs/admin/emailcollector_card.php
@@ -583,17 +583,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$arrayoftypes = array(
'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
- 'recordjoinpiece'=>$langs->trans('recordjoinpieceonobject'),
+ 'recordjoinpiece'=>'AttachJoinedDocumentsToObject',
'recordevent'=>'RecordEvent');
+ $arrayoftypesnocondition = $arrayoftypes;
if ($conf->projet->enabled) {
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
}
+ $arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
if ($conf->ticket->enabled) {
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
}
+ $arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty';
if ($conf->recruitment->enabled) {
$arrayoftypes['candidature'] = 'CreateCandidature';
}
+ $arrayoftypesnocondition['candidature'] = 'CreateCandidature';
// support hook for add action
$parameters = array('arrayoftypes' => $arrayoftypes);
@@ -629,7 +633,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '
';
print '| ';
print '';
- print $langs->trans($arrayoftypes[$ruleaction['type']]);
+ if (array_key_exists($ruleaction['type'], $arrayoftypes)) {
+ print $langs->trans($arrayoftypes[$ruleaction['type']]);
+ } else {
+ if (array_key_exists($ruleaction['type'], $arrayoftypesnocondition)) {
+ print ''.$langs->trans($arrayoftypesnocondition[$ruleaction['type']]).' - '.$langs->trans("Disabled").'';
+ }
+ }
+
if (in_array($ruleaction['type'], array('recordevent'))) {
print $form->textwithpicto('', $langs->transnoentitiesnoconv('IfTrackingIDFoundEventWillBeLinked'));
} elseif (in_array($ruleaction['type'], array('loadthirdparty', 'loadandcreatethirdparty'))) {
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index ba889ec41e3..54bfe56b067 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -2071,11 +2071,12 @@ NothingProcessed=Nothing done
XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done)
RecordEvent=Record email event
CreateLeadAndThirdParty=Create lead (and third party if necessary)
-CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation)
+CreateTicketAndThirdParty=Create ticket (linked to a third party if the third party was loaded by a previous operation, with no link to any third party otherwise)
CodeLastResult=Latest result code
NbOfEmailsInInbox=Number of emails in source directory
LoadThirdPartyFromName=Load third party searching on %s (load only)
LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found)
+AttachJoinedDocumentsToObject=Save attached files into object documents if a ref of an object is found into email topic.
WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr
WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr
WithDolTrackingIDInMsgId=Message sent from Dolibarr
|