switch to tab with customfield widget (empty name for call cfs), if validation error is for a cf (name prefixed with #), if no tab found add validation message to $content[msg] as a last resort to make it more visible to the user

This commit is contained in:
Ralf Becker 2011-05-18 14:23:23 +00:00
parent d0d105b937
commit 678efd6ced

View File

@ -489,10 +489,23 @@ class etemplate extends boetemplate
$content[$tab_name] = $tab;
break 3;
}
elseif($name[0] == '#')
{
foreach($tab_tpl->get_widgets_by_type('customfields') as $cf_widget)
{
if (empty($cf_widget['name']))
{
$content[$tab_name] = $tab;
break 4;
}
}
}
}
}
// widget NOT found --> as last resort add valdation message to $content['msg']
$content['msg'] .= ($content['msg'] ? "\n" : '').$msg;
}
}
//echo "process_exec($this->name) process_show(content) ="; _debug_array($content);
//echo "process_exec($this->name) session_data[changes] ="; _debug_array(self::$request->changes);