forked from extern/egroupware
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'];
|
||||
unset($preserve['jpegphoto'], $content['jpegphoto']); // unused and messes up json encoding (not utf-8)
|
||||
$this->tmpl->setElementAttribute('tabs', 'add_tabs', true);
|
||||
$tabs =& $this->tmpl->getElementAttribute('tabs', 'tabs');
|
||||
$tabs =& $this->tmpl->getElementAttribute('tabs', 'extraTabs');
|
||||
if (($first_call = !isset($tabs)))
|
||||
{
|
||||
$tabs = array();
|
||||
|
@ -47,11 +47,6 @@ class Tabbox extends Etemplate\Widget
|
||||
$form_name = self::form_name($params[0], $this->id, $params[1]);
|
||||
|
||||
// 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')))
|
||||
{
|
||||
$tabs = $this->attrs['extraTabs'];
|
||||
|
@ -1600,7 +1600,7 @@ class filemanager_ui
|
||||
// add to existing tabs in template
|
||||
$tpl->setElementAttribute('tabs', 'add_tabs', true);
|
||||
|
||||
$tabs =& $tpl->getElementAttribute('tabs','tabs');
|
||||
$tabs =& $tpl->getElementAttribute('extraTabs', 'tabs');
|
||||
if (true) $tabs = array();
|
||||
|
||||
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);
|
||||
$tabs =& $tmpl->getElementAttribute('tabs', 'tabs');
|
||||
$tabs =& $tmpl->getElementAttribute('tabs', 'extraTabs');
|
||||
if (($first_call = !isset($tabs)))
|
||||
{
|
||||
$tabs = array();
|
||||
|
@ -567,12 +567,13 @@ class preferences_settings
|
||||
// defining used tabs on run-time
|
||||
if ($tabs)
|
||||
{
|
||||
$tpl->setElementAttribute('tabs', 'tabs', $tabs);
|
||||
$tpl->setElementAttribute('tabs', 'extraTabs', $tabs);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 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',
|
||||
'template' => 'preferences.settings.tab1',
|
||||
'label' => 'general settings'
|
||||
|
Loading…
Reference in New Issue
Block a user