mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 17:33:49 +01:00
Fully remove "tabs" attribute for tabbox, it overwrites the internal tabs collection.
Even checking for it sets 'tabs' attribute to null. Use "extraTabs" instead.
This commit is contained in:
parent
18764aab64
commit
f332b7bba5
@ -2791,7 +2791,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
$preserve['old_owner'] = $content['owner'];
|
$preserve['old_owner'] = $content['owner'];
|
||||||
unset($preserve['jpegphoto'], $content['jpegphoto']); // unused and messes up json encoding (not utf-8)
|
unset($preserve['jpegphoto'], $content['jpegphoto']); // unused and messes up json encoding (not utf-8)
|
||||||
$this->tmpl->setElementAttribute('tabs', 'add_tabs', true);
|
$this->tmpl->setElementAttribute('tabs', 'add_tabs', true);
|
||||||
$tabs =& $this->tmpl->getElementAttribute('tabs', 'tabs');
|
$tabs =& $this->tmpl->getElementAttribute('tabs', 'extraTabs');
|
||||||
if (($first_call = !isset($tabs)))
|
if (($first_call = !isset($tabs)))
|
||||||
{
|
{
|
||||||
$tabs = array();
|
$tabs = array();
|
||||||
|
@ -47,11 +47,6 @@ class Tabbox extends Etemplate\Widget
|
|||||||
$form_name = self::form_name($params[0], $this->id, $params[1]);
|
$form_name = self::form_name($params[0], $this->id, $params[1]);
|
||||||
|
|
||||||
// Make sure additional tabs are processed for any method
|
// Make sure additional tabs are processed for any method
|
||||||
if($tabs = self::getElementAttribute($form_name, 'tabs'))
|
|
||||||
{
|
|
||||||
// tabs is not usable in webComponent, need to use extraTabs
|
|
||||||
self::setElementAttribute($form_name, 'extraTabs', $tabs);
|
|
||||||
}
|
|
||||||
if(!($tabs =& self::getElementAttribute($form_name, 'extraTabs')))
|
if(!($tabs =& self::getElementAttribute($form_name, 'extraTabs')))
|
||||||
{
|
{
|
||||||
$tabs = $this->attrs['extraTabs'];
|
$tabs = $this->attrs['extraTabs'];
|
||||||
|
@ -1600,7 +1600,7 @@ class filemanager_ui
|
|||||||
// add to existing tabs in template
|
// add to existing tabs in template
|
||||||
$tpl->setElementAttribute('tabs', 'add_tabs', true);
|
$tpl->setElementAttribute('tabs', 'add_tabs', true);
|
||||||
|
|
||||||
$tabs =& $tpl->getElementAttribute('tabs','tabs');
|
$tabs =& $tpl->getElementAttribute('extraTabs', 'tabs');
|
||||||
if (true) $tabs = array();
|
if (true) $tabs = array();
|
||||||
|
|
||||||
foreach(isset($extra_tabs[0]) ? $extra_tabs : array($extra_tabs) as $extra_tab)
|
foreach(isset($extra_tabs[0]) ? $extra_tabs : array($extra_tabs) as $extra_tab)
|
||||||
|
@ -168,7 +168,7 @@ class preferences_password
|
|||||||
];
|
];
|
||||||
|
|
||||||
$tmpl->setElementAttribute('tabs', 'add_tabs', true);
|
$tmpl->setElementAttribute('tabs', 'add_tabs', true);
|
||||||
$tabs =& $tmpl->getElementAttribute('tabs', 'tabs');
|
$tabs =& $tmpl->getElementAttribute('tabs', 'extraTabs');
|
||||||
if (($first_call = !isset($tabs)))
|
if (($first_call = !isset($tabs)))
|
||||||
{
|
{
|
||||||
$tabs = array();
|
$tabs = array();
|
||||||
|
@ -567,12 +567,13 @@ class preferences_settings
|
|||||||
// defining used tabs on run-time
|
// defining used tabs on run-time
|
||||||
if ($tabs)
|
if ($tabs)
|
||||||
{
|
{
|
||||||
$tpl->setElementAttribute('tabs', 'tabs', $tabs);
|
$tpl->setElementAttribute('tabs', 'extraTabs', $tabs);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Modifications are kept in the request, so reset to just one
|
// Modifications are kept in the request, so reset to just one
|
||||||
$tpl->setElementAttribute('tabs', 'tabs', array(array(
|
$tpl->setElementAttribute('tabs', 'extraTabs', array(
|
||||||
|
array(
|
||||||
'id' => 'tab1',
|
'id' => 'tab1',
|
||||||
'template' => 'preferences.settings.tab1',
|
'template' => 'preferences.settings.tab1',
|
||||||
'label' => 'general settings'
|
'label' => 'general settings'
|
||||||
|
Loading…
Reference in New Issue
Block a user