WIP allow to place custom-fields in tabs: adding cfDisabled="true" to disable automatic adding of custom-fields, e.g. for templates not showing an entry

This commit is contained in:
ralf 2024-04-01 12:42:56 +02:00
parent 79b3085ac1
commit b04318a099

View File

@ -30,6 +30,7 @@ use EGroupware\Api;
* + id: id of tab
* + content: optional namespace (content attribute of template)
* + statustext: tooltip of label
* - cfDisabled: true: disable adding custom-fields e.g. for templates not showing an entry, false (default): add custom-fields automatic
* - cfTypeFilter: optional type-filter for automatic created custom-fields tabs
* - cfPrivateTab: true: create an extra tab for private custom-fields, false (default): show private ones together with non-private ones
* - cfPrepend: value for prepend tab-attribute for dynamic generated custom-field tabs, default "history"
@ -163,6 +164,11 @@ class Tabbox extends Etemplate\Widget
{
$prepend = in_array($prepend, ['true', '1']);
}
// is adding of CFs disabled --> exit
if (!empty($this->attrs['cfDisabled']))
{
return;
}
// check if template still contains a legacy customfield tab
$have_legacy_cf_tab = $this->haveLegacyCfTab();