From b42943401013e4f0591e99578fbc4260f3b56526 Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 21 Mar 2024 17:28:42 +0200 Subject: [PATCH] WIP dynamic CF tabs: if app already specifed extraTabs (like e.g. Addressbook), we need to add to them not overwrite them --- api/src/Etemplate/Widget/Tabbox.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Etemplate/Widget/Tabbox.php b/api/src/Etemplate/Widget/Tabbox.php index c66c002ff6..e8440b3924 100644 --- a/api/src/Etemplate/Widget/Tabbox.php +++ b/api/src/Etemplate/Widget/Tabbox.php @@ -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)); } }