WIP allow to place custom-fields in tabs: fix boolean values for cfPrepend attribute

This commit is contained in:
ralf 2024-03-25 17:15:22 +02:00
parent dedaa29204
commit c8e968ba1e

View File

@ -158,6 +158,10 @@ class Tabbox extends Etemplate\Widget
} }
$prepend = $this->attrs['cfPrepend'] ?? 'history'; $prepend = $this->attrs['cfPrepend'] ?? 'history';
if (in_array($prepend, ['true', '1', 'false', '0', '']))
{
$prepend = in_array($prepend, ['true', '1']);
}
// check if template still contains a legacy customfield tab // check if template still contains a legacy customfield tab
$have_legacy_cf_tab = $this->haveLegacyCfTab(); $have_legacy_cf_tab = $this->haveLegacyCfTab();