FIX the extrafields separator was not translated
This commit is contained in:
parent
768b9d3d1e
commit
78fcbe9633
@ -5996,7 +5996,7 @@ abstract class CommonObject
|
||||
|
||||
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate')
|
||||
{
|
||||
$out .= $extrafields->showSeparator($key);
|
||||
$out .= $extrafields->showSeparator($key, $this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1743,11 +1743,16 @@ class ExtraFields
|
||||
* Return HTML string to print separator extrafield
|
||||
*
|
||||
* @param string $key Key of attribute
|
||||
* @return string
|
||||
* @param string $object Object
|
||||
* @return string HTML code with line for separator
|
||||
*/
|
||||
function showSeparator($key)
|
||||
function showSeparator($key, $object)
|
||||
{
|
||||
$out = '<tr class="trextrafieldseparator trextrafieldseparator'.$key.'"><td colspan="4"><strong>'.$this->attribute_label[$key].'</strong></td></tr>';
|
||||
global $langs;
|
||||
|
||||
$out = '<tr class="trextrafieldseparator trextrafieldseparator'.$key.'"><td colspan="2"><strong>';
|
||||
$out.= $langs->trans($this->attributes[$object->table_element]['label'][$key]);
|
||||
$out.= '</strong></td></tr>';
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element][
|
||||
}
|
||||
if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
print $extrafields->showSeparator($key, $object);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user