2
0
forked from Wavyzz/dolibarr

Ajout de picto pour le genre et la civilité

This commit is contained in:
Givriz
2021-03-10 16:31:50 +01:00
parent 628d434823
commit 6e46396b17
5 changed files with 22 additions and 49 deletions

View File

@@ -7894,6 +7894,22 @@ class Form
if (empty($fieldref)) {
$fieldref = 'ref';
}
// Preparing gender's display if there is one
if ($object->gender) {
$addgendertxt = ' ';
switch ($object->gender) {
case 'man':
$addgendertxt .= '<i class="fas fa-mars"></i>';
break;
case 'woman':
$addgendertxt .= '<i class="fas fa-venus"></i>';
break;
case 'other':
$addgendertxt .= '<i class="fas fa-genderless"></i>';
break;
}
} else $addgendertxt = '';
// Add where from hooks
if (is_object($hookmanager)) {
@@ -8021,12 +8037,12 @@ class Form
$ret .= $object->ref.'<br>';
$fullname = $object->getFullName($langs);
if ($object->morphy == 'mor' && $object->societe) {
$ret .= dol_htmlentities($object->societe).((!empty($fullname) && $object->societe != $fullname) ? ' ('.dol_htmlentities($fullname).')' : '');
$ret .= dol_htmlentities($object->societe).((!empty($fullname) && $object->societe != $fullname) ? ' ('.dol_htmlentities($fullname).$addgendertxt.')' : '');
} else {
$ret .= dol_htmlentities($fullname).((!empty($object->societe) && $object->societe != $fullname) ? ' ('.dol_htmlentities($object->societe).')' : '');
$ret .= dol_htmlentities($fullname).$addgendertxt.((!empty($object->societe) && $object->societe != $fullname) ? ' ('.dol_htmlentities($object->societe).')' : '');
}
} elseif (in_array($object->element, array('contact', 'user', 'usergroup'))) {
$ret .= dol_htmlentities($object->getFullName($langs));
$ret .= dol_htmlentities($object->getFullName($langs)).$addgendertxt;
} elseif (in_array($object->element, array('action', 'agenda'))) {
$ret .= $object->ref.'<br>'.$object->label;
} elseif (in_array($object->element, array('adherent_type'))) {