FIX: Load the translation file for extrafields

This commit is contained in:
Alexandre SPANGARO 2020-03-19 11:53:42 +01:00
parent fca6d45baa
commit a6227aeb6a

View File

@ -848,7 +848,7 @@ class ExtraFields
public function fetch_name_optionals_label($elementtype, $forceload = false)
{
// phpcs:enable
global $conf;
global $langs, $conf;
if (empty($elementtype)) return array();
@ -912,6 +912,11 @@ class ExtraFields
$array_name_label[$tab->name] = $tab->label;
}
if (! empty($tab->langs))
{
$langs->load($tab->langs);
}
// Old usage
$this->attribute_type[$tab->name] = $tab->type;
$this->attribute_label[$tab->name] = $tab->label;
@ -1944,6 +1949,10 @@ class ExtraFields
{
$align = "right";
}
elseif ($type == 'price')
{
$align="right";
}
elseif ($type == 'double')
{
$align = "right";