Merge pull request #3 from simicar29/simicar29-patch-4
Show extrafields only when enabled
This commit is contained in:
commit
03860b2ef6
@ -6624,7 +6624,12 @@ abstract class CommonObject
|
|||||||
if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue;
|
if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue;
|
||||||
|
|
||||||
// @todo Add test also on 'enabled' (different than 'list' that is 'visibility')
|
// @todo Add test also on 'enabled' (different than 'list' that is 'visibility')
|
||||||
//$enabled = 1;
|
$enabled = 1;
|
||||||
|
if ($enabled && isset($extrafields->attributes[$this->table_element]['enabled'][$key]))
|
||||||
|
{
|
||||||
|
$enabled = dol_eval($extrafields->attributes[$this->table_element]['enabled'][$key], 1);
|
||||||
|
}
|
||||||
|
if (empty($enabled)) continue;
|
||||||
|
|
||||||
$visibility = 1;
|
$visibility = 1;
|
||||||
if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key]))
|
if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key]))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user