WIP dynamic CF tabs: if app already specifed extraTabs (like e.g. Addressbook), we need to add to them not overwrite them

This commit is contained in:
ralf 2024-03-21 17:28:42 +02:00
parent f4146d6b72
commit b429434010

View File

@ -165,6 +165,11 @@ class Tabbox extends Etemplate\Widget
{
self::$request->content = $content;
self::setElementAttribute($this->id, 'addTabs', true);
// if app already specifed extraTabs (like e.g. Addressbook), we need to add to them not overwrite them
if (($extra_tabs = self::setElementAttribute($this->id, 'extraTabs', null)))
{
$tabs = array_merge($extra_tabs, array_values($tabs));
}
self::setElementAttribute($this->id, 'extraTabs', array_values($tabs));
}
}