diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 7f0dbebaed4..b5d17676d8d 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -893,6 +893,7 @@ class Contact extends CommonObject
$sql.=" FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc";
$sql.=" WHERE ec.fk_c_type_contact = tc.rowid";
$sql.=" AND fk_socpeople = ". $this->id;
+ $sql.=" AND tc.source = 'external'";
$sql.=" GROUP BY tc.element";
dol_syslog(get_class($this)."::load_ref_elements", LOG_DEBUG);
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index be6f64c1365..d42d1dde48f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3503,13 +3503,19 @@ class Form
while($res = $this->db->fetch_object($resql))
{
+ $unitLabel = $res->label;
+ if (! empty($langs->tab_translate['unit'.$res->code])) // check if Translation is available before
+ {
+ $unitLabel = $langs->trans('unit'.$res->code)!=$res->label?$langs->trans('unit'.$res->code):$res->label;
+ }
+
if ($selected == $res->rowid)
{
- $return.='';
+ $return.='';
}
else
{
- $return.='';
+ $return.='';
}
}
$return.='';