diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 32c6b6a9b5871..cb52f20f94bd8 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -255,11 +255,13 @@ $entry->contact_id = $userstatic->id; $entry->contact_html = $userstatic->getNomUrl(-1, '', 0, 0, 0, 0, '', 'valignmiddle'); $entry->contact_name = strtolower($userstatic->getFullName($langs)); + $entry->contact_warning = false; } elseif ($contact['source'] == 'external') { $contactstatic->fetch($contact['id']); $entry->contact_id = $contactstatic->id; $entry->contact_html = $contactstatic->getNomUrl(1, '', 0, '', 0, 0); $entry->contact_name = strtolower($contactstatic->getFullName($langs)); + $entry->contact_warning = ($contactstatic->user_id > 0); } if ($contact['source'] == 'internal') { @@ -325,14 +327,27 @@ print ""; foreach ($list as $entry) { - print ''; - - print ''.$entry->thirdparty_html.''; - print ''.$entry->contact_html.''; - print ''.dol_escape_htmltag($entry->nature_html).''; - print ''.dol_escape_htmltag($entry->type).''; - print ''.$entry->status_html.''; - +?> + + + thirdparty_html ?> + + + contact_html ?> + + + + nature_html) ?> + + contact_warning ? img_picto($langs->trans("ThisContactHasAnUser"), 'warning') : '') ?> + + + type) ?> + + + status_html ?> + +id); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 18dc30a2c5f29..3813ea70f76e5 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1299,3 +1299,4 @@ AllEntities=All entities TranslationOfKey=Translation of the key AnyTranslationKey SignedStatus=Signed status NbRecordQualified=Number of qualified records +ThisContactHasAnUser=Warning, you must assign the associated user and not this contact to allow access to this object.