diff --git a/htdocs/core/class/commonpeople.class.php b/htdocs/core/class/commonpeople.class.php
index 016a5a185a6..222fe8b5424 100644
--- a/htdocs/core/class/commonpeople.class.php
+++ b/htdocs/core/class/commonpeople.class.php
@@ -233,37 +233,56 @@ trait CommonPeople
if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) {
$out .= ($outdone ? '
' : '');
}
+
+ // Phones
+ $outphonedone = 0;
if (!empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
$outdone++;
+ $outphonedone++;
}
if (!empty($this->phone_pro)) {
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
$outdone++;
+ $outphonedone++;
}
if (!empty($this->phone_mobile)) {
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile"));
$outdone++;
+ $outphonedone++;
}
if (!empty($this->phone_perso)) {
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePerso"));
$outdone++;
+ $outphonedone++;
}
if (!empty($this->office_phone)) {
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
$outdone++;
+ $outphonedone++;
}
if (!empty($this->user_mobile)) {
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile"));
$outdone++;
+ $outphonedone++;
}
if (!empty($this->fax)) {
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax"));
$outdone++;
+ $outphonedone++;
}
if (!empty($this->office_fax)) {
+ $out .= ($outphonedone ? ' ' : '');
$out .= dol_print_phone($this->office_fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax"));
$outdone++;
+ $outphonedone++;
}
if ($out) {
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a020304cce7..6365e860539 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -9942,13 +9942,13 @@ class Form
$addgendertxt = ' ';
switch ($object->gender) {
case 'man':
- $addgendertxt .= '';
+ $addgendertxt .= '';
break;
case 'woman':
- $addgendertxt .= '';
+ $addgendertxt .= '';
break;
case 'other':
- $addgendertxt .= '';
+ $addgendertxt .= '';
break;
}
}
@@ -10087,7 +10087,7 @@ class Form
$ret .= dol_htmlentities($fullname) . $addgendertxt . ((!empty($object->societe) && $object->societe != $fullname) ? ' (' . dol_htmlentities($object->societe) . ')' : '');
}
} elseif (in_array($object->element, array('contact', 'user'))) {
- $ret .= dol_htmlentities($object->getFullName($langs)) . $addgendertxt;
+ $ret .= ''.dol_htmlentities($object->getFullName($langs)).''.$addgendertxt;
} elseif ($object->element == 'usergroup') {
$ret .= dol_htmlentities($object->name);
} elseif (in_array($object->element, array('action', 'agenda'))) {
@@ -10106,7 +10106,7 @@ class Form
$ret .= ' ';
}
- $ret .= $morehtmlref;
+ $ret .= ''.$morehtmlref;
}
$ret .= '';
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index bba3dd508b5..8c775b2bffc 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1442,7 +1442,7 @@ if ($action == 'create' || $action == 'adduserldap') {
// Check if user has rights
if (!getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
$object->loadRights();
- if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) {
+ if (empty($object->nb_rights) && $object->status != 0 && empty($object->admin)) {
setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
}
}
@@ -1534,12 +1534,12 @@ if ($action == 'create' || $action == 'adduserldap') {
if ($action != 'edit') {
print dol_get_fiche_head($head, 'user', $title, -1, 'user');
- $morehtmlref = '';
+ $morehtmlref = '';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard").' ('.$langs->trans("AddToContacts").')', 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '';
$urltovirtualcard = '/user/virtualcard.php?id='.((int) $object->id);
- $morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->transnoentitiesnoconv("PublicVirtualCardUrl").' - '.$object->getFullName($langs), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', 'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard, '', 'nohover');
+ $morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->transnoentitiesnoconv("PublicVirtualCardUrl").' - '.$object->getFullName($langs), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', 'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard, '', 'valignmiddle nohover');
dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin, 'rowid', 'ref', $morehtmlref);