fixed double displayed label

This commit is contained in:
Ralf Becker 2007-07-12 08:03:37 +00:00
parent 2fc090e301
commit 58c7f4bf61

View File

@ -122,7 +122,8 @@
$row_class = 'row'; $row_class = 'row';
etemplate::add_child($cell,$label =& etemplate::empty_cell('label','',array( etemplate::add_child($cell,$label =& etemplate::empty_cell('label','',array(
'label' => $field['label'], 'label' => $field['label'],
'no_lang' => substr(lang($field['label']),-1) == '*' ? 2 : 0 'no_lang' => substr(lang($field['label']),-1) == '*' ? 2 : 0,
'span' => $field['type'] === 'label' ? '2' : '',
))); )));
} }
switch ((string)$field['type']) switch ((string)$field['type'])
@ -154,7 +155,6 @@
} }
break; break;
case 'label' : case 'label' :
$label['span'] = 'all';
$row_class = 'th'; $row_class = 'th';
break; break;
case 'checkbox' : case 'checkbox' :
@ -208,6 +208,10 @@
'size' => $field['type'] == 'link-entry' ? '' : $field['type'], 'size' => $field['type'] == 'link-entry' ? '' : $field['type'],
)); ));
} }
$cell['data'][0]['c'.$n++] = $row_class.',top';
if (!is_null($input))
{
if ($readonly) $input['readonly'] = true; if ($readonly) $input['readonly'] = true;
if (!empty($field['help']) && $row_class != 'th') if (!empty($field['help']) && $row_class != 'th')
@ -215,9 +219,9 @@
$input['help'] = $field['help']; $input['help'] = $field['help'];
$input['no_lang'] = substr(lang($help),-1) == '*' ? 2 : 0; $input['no_lang'] = substr(lang($help),-1) == '*' ? 2 : 0;
} }
$cell['data'][0]['c'.$n++] = $row_class.',top';
etemplate::add_child($cell,$input); etemplate::add_child($cell,$input);
unset($input); unset($input);
}
unset($label); unset($label);
} }
if ($type != 'customfields-list') if ($type != 'customfields-list')