"unit was missing for readonly values"

This commit is contained in:
Ralf Becker 2008-05-20 12:21:53 +00:00
parent 7ba02f326a
commit 6c1dcb430d

View File

@ -367,12 +367,13 @@
}
if (!in_array($input_format,array('d','h','dh','m','hm','dhm'))) $input_format = 'dh'; // hours + days
$unit = $input_format == 'd' ? 'd' : 'h';
if (!$readonly) // dont set extension-data on readonly, it's not needed and can conflict with other widgets
{
$extension_data = array(
'type' => $cell['type'],
'data_format' => $data_format,
'unit' => ($unit = $input_format == 'd' ? 'd' : 'h'),
'unit' => $unit,
'input_format' => $input_format,
'hours_per_day' => $hours_per_day,
'percent_allowed'=> $percent_allowed,