"validation error in named tab (eg. \"tabs=general|one|two\") did not change to tab with field causing the validation error"

This commit is contained in:
Ralf Becker 2009-05-21 19:16:32 +00:00
parent 040139dfac
commit ef1227767a

View File

@ -420,13 +420,15 @@ class etemplate extends boetemplate
{
foreach($this->get_widgets_by_type('tab') as $widget)
{
foreach(explode('|',$widget['name']) as $tab)
$tab_name = $tabs = $widget['name'];
if (strpos($tabs,'=') !== false) list($tab_name,$tabs) = explode('=',$tabs,2);
foreach(explode('|',$tabs) as $tab)
{
if (strpos('.',$tab) === false) $tab = $this->name.'.'.$tab;
$tab_tpl = new etemplate($tab);
if ($tab_tpl->get_widget_by_name($name))
{
$content[$widget['name']] = $tab;
$content[$tab_name] = $tab;
break 3;
}
}