Fix key were not translated

This commit is contained in:
Laurent Destailleur 2017-04-03 10:44:55 +02:00
parent 6a69f9349b
commit 13587fa13e
2 changed files with 3 additions and 3 deletions

View File

@ -5176,7 +5176,7 @@ class Form
*/
static function multiSelectArrayWithCheckbox($htmlname, &$array, $varpage)
{
global $conf,$user;
global $conf,$langs,$user;
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) return '';
@ -5209,7 +5209,7 @@ class Form
}
if ($val['label'])
{
$lis.='<li><input type="checkbox" value="'.$key.'"'.(empty($val['checked'])?'':' checked="checked"').'/>'.dol_escape_htmltag($val['label']).'</li>';
$lis.='<li><input type="checkbox" value="'.$key.'"'.(empty($val['checked'])?'':' checked="checked"').'/>'.dol_escape_htmltag($langs->trans($val['label'])).'</li>';
$listcheckedstring.=(empty($val['checked'])?'':$key.',');
}
}

View File

@ -624,7 +624,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
print_liste_field_titre($langs->trans($extralabels[$key]),$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
}
}
}