Merge pull request #8902 from bgenere/develop
FIX extrafield template for list and resource list with extrafields
This commit is contained in:
commit
5f4932c0b0
@ -25,7 +25,12 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
|
|||||||
$tmpkey='options_'.$key;
|
$tmpkey='options_'.$key;
|
||||||
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')))
|
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')))
|
||||||
{
|
{
|
||||||
$value = $db->jdate($obj->$tmpkey);
|
$datenotinstring = $obj->$tmpkey;
|
||||||
|
if (! is_numeric($obj->$tmpkey)) // For backward compatibility
|
||||||
|
{
|
||||||
|
$datenotinstring = $db->jdate($datenotinstring);
|
||||||
|
}
|
||||||
|
$value = $datenotinstring;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -265,6 +265,7 @@ if ($ret)
|
|||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
|
$obj = (Object) $resource->array_options;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user