Merge pull request #8902 from bgenere/develop

FIX extrafield template for list and resource list with extrafields
This commit is contained in:
Laurent Destailleur 2018-06-04 13:44:14 +02:00 committed by GitHub
commit 5f4932c0b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,12 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
$tmpkey='options_'.$key;
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
{

View File

@ -265,6 +265,7 @@ if ($ret)
if (! $i) $totalarray['nbfield']++;
}
// Extra fields
$obj = (Object) $resource->array_options;
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
print '<td align="center">';