Merge pull request #3395 from fmarcet/develop
NEW: Translate extrafield's labels
This commit is contained in:
commit
25fca6615a
@ -3794,7 +3794,7 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
function showOptionals($extrafields, $mode='view', $params=null, $keyprefix='')
|
function showOptionals($extrafields, $mode='view', $params=null, $keyprefix='')
|
||||||
{
|
{
|
||||||
global $_POST, $conf;
|
global $_POST, $conf, $langs;
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
@ -3852,7 +3852,7 @@ abstract class CommonObject
|
|||||||
if($extrafields->attribute_required[$key])
|
if($extrafields->attribute_required[$key])
|
||||||
$label = '<span class="fieldrequired">'.$label.'</span>';
|
$label = '<span class="fieldrequired">'.$label.'</span>';
|
||||||
|
|
||||||
$out .= '<td>'.$label.'</td>';
|
$out .= '<td>'.$langs->trans($label).'</td>';
|
||||||
$out .='<td'.($colspan?' colspan="'.$colspan.'"':'').'>';
|
$out .='<td'.($colspan?' colspan="'.$colspan.'"':'').'>';
|
||||||
|
|
||||||
switch($mode) {
|
switch($mode) {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ if (empty($reshook) && ! empty($extrafields->attribute_label))
|
|||||||
print '<table width="100%" class="nobordernopadding"><tr><td';
|
print '<table width="100%" class="nobordernopadding"><tr><td';
|
||||||
//var_dump($action);exit;
|
//var_dump($action);exit;
|
||||||
if ((! empty($action) && ($action == 'create' || $action == 'edit')) && ! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
if ((! empty($action) && ($action == 'create' || $action == 'edit')) && ! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
print '>' . $label . '</td>';
|
print '>' . $langs->trans($label) . '</td>';
|
||||||
|
|
||||||
//TODO Improve element and rights detection
|
//TODO Improve element and rights detection
|
||||||
//var_dump($user->rights);
|
//var_dump($user->rights);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user