Skip to content
Snippets Groups Projects
Verified Commit 16f377c3 authored by Damien's avatar Damien
Browse files

FEAT #8550 Format contact

parent fd582fda
No related branches found
No related tags found
No related merge requests found
...@@ -502,18 +502,18 @@ class AutoCompleteController ...@@ -502,18 +502,18 @@ class AutoCompleteController
if (!empty($aArgs['contact']['address_postal_code'])) { if (!empty($aArgs['contact']['address_postal_code'])) {
$address.= $aArgs['contact']['address_postal_code'] . ' '; $address.= $aArgs['contact']['address_postal_code'] . ' ';
} }
$idToDisplay = "{$aArgs['contact']['contact_firstname']} {$aArgs['contact']['contact_lastname']}"; $contactToDisplay = "{$aArgs['contact']['contact_firstname']} {$aArgs['contact']['contact_lastname']}";
if (!empty($aArgs['contact']['society'])) { if (!empty($aArgs['contact']['society'])) {
$idToDisplay .= " ({$aArgs['contact']['society']})"; $contactToDisplay .= " ({$aArgs['contact']['society']})";
} }
$contact = [ $contact = [
'type' => 'contact', 'type' => 'contact',
'id' => $aArgs['contact']['ca_id'], 'id' => $aArgs['contact']['ca_id'],
'contact' => "{$aArgs['contact']['contact_firstname']} {$aArgs['contact']['contact_lastname']} ({$aArgs['contact']['society']})", 'contact' => $contactToDisplay,
'address' => $address, 'address' => $address,
'idToDisplay' => "{$idToDisplay}<br/>{$address}", 'idToDisplay' => "{$contactToDisplay}<br/>{$address}",
'otherInfo' => "{$idToDisplay} - {$address}" 'otherInfo' => "{$contactToDisplay} - {$address}"
]; ];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment