mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-18 19:04:36 +01:00
Merge pull request #3 from simicar29/simicar29-patch-4
Show extrafields only when enabled
This commit is contained in:
@@ -6624,7 +6624,12 @@ abstract class CommonObject
|
||||
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')
|
||||
//$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;
|
||||
if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key]))
|
||||
|
||||
Reference in New Issue
Block a user