forked from extern/egroupware
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:
parent
d0d105b937
commit
678efd6ced
@ -489,8 +489,21 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user