diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index f9d6edfd4e5..90c84dce7bc 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -1541,13 +1541,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Morphy
print '
| '.$langs->trans("MemberNature").' | '.$object->getmorphylib().' | ';
print '
';
-
- // Gender
- print '| '.$langs->trans("Gender").' | ';
- print '';
- if ($object->gender) {
- print $langs->trans("Gender".$object->gender);
- }
+
print ' |
';
// Company
diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php
index 9815b824cc5..272bc6c7777 100644
--- a/htdocs/adherents/subscription.php
+++ b/htdocs/adherents/subscription.php
@@ -492,13 +492,7 @@ if ($rowid > 0) {
// Morphy
print '| '.$langs->trans("MemberNature").' | '.$object->getmorphylib().' | ';
print '
';
-
- // Gender
- print '| '.$langs->trans("Gender").' | ';
- print '';
- if ($object->gender) print $langs->trans("Gender".$object->gender);
- print ' |
';
-
+
// Company
print '| '.$langs->trans("Company").' | '.$object->company.' |
';
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index bd65f912981..e75908adc10 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -1278,17 +1278,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Civility
print '| '.$langs->trans("UserTitle").' | ';
- switch ($object->civility) {
- case 'Madame':
- print '';
- break;
- case 'Monsieur':
- print '';
- break;
- default:
- print $object->getCivilityLabel();
- break;
- }
+ print $object->getCivilityLabel();
print ' |
';
// Job / position
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8324e500c3c..03ab4dda230 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -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 .= '';
+ break;
+ case 'woman':
+ $addgendertxt .= '';
+ break;
+ case 'other':
+ $addgendertxt .= '';
+ break;
+ }
+ } else $addgendertxt = '';
// Add where from hooks
if (is_object($hookmanager)) {
@@ -8021,12 +8037,12 @@ class Form
$ret .= $object->ref.'
';
$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.'
'.$object->label;
} elseif (in_array($object->element, array('adherent_type'))) {
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index bf5046ffda9..4496178fe67 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1466,27 +1466,6 @@ if ($action == 'create' || $action == 'adduserldap') {
print ''."\n";
}
- // Gender
- print '| '.$langs->trans("Gender").' | ';
- print '';
- if ($object->gender) {
- switch ($object->gender) {
- case 'man':
- print '';
- break;
- case 'woman':
- print '';
- break;
- case 'other':
- print '';
- break;
- default:
- print $langs->trans("Gender".$object->gender);
- break;
- }
- }
- print ' |
';
-
// Employee
print '| '.$langs->trans("Employee").' | ';
print yn($object->employee);
|