"fixed single field display of customfields, was creating an extra grid and array level in the result"

This commit is contained in:
Ralf Becker 2007-12-07 07:52:14 +00:00
parent 3bcc3ee251
commit e13da61106

View File

@ -109,6 +109,7 @@
{
$fields = array($name => $fields[$name]);
$value = array($this->prefix.$name => $value);
$singlefield = true;
}
switch($type = $cell['type'])
{
@ -335,6 +336,12 @@
$input['help'] = $field['help'];
$input['no_lang'] = substr(lang($help),-1) == '*' ? 2 : 0;
}
if ($singlefield) // a single field, can & need to be returned instead of the cell (no grid)
{
$cell = $input;
if ($type == 'customfields') $cell['label'] = $field['label'];
return true;
}
etemplate::add_child($cell,$input);
unset($input);
}