Merge pull request #11958 from altatof/clipboard

NEW : add MAIN_SHOW_COMPANY_NAME_IN_BANNER_ADDRESS constant
This commit is contained in:
Laurent Destailleur 2019-09-27 12:14:09 +02:00 committed by GitHub
commit 0aea902681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -616,7 +616,12 @@ abstract class CommonObject
{
if (! empty($conf->use_javascript_ajax))
{
$namecoords = $this->getFullName($langs, 1).'<br>'.$coords;
$namecoords = '';
if ( $this->element == 'contact' && ! empty($conf->global->MAIN_SHOW_COMPANY_NAME_IN_BANNER_ADDRESS))
{
$namecoords.= $object->name.'<br>';
}
$namecoords.= $this->getFullName($langs, 1).'<br>'.$coords;
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
$out.='<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
$out.=img_picto($langs->trans("Address"), 'object_address.png');