Fix FormHelper::input ignoring value option.

Signed-off-by: mark_story <mark@mark-story.com>

Backport fixes from #7082 to 2.7
This commit is contained in:
Yoshiyuki Kinjo 2015-07-21 23:04:20 +09:00 committed by mark_story
parent e25be3a47e
commit 00919c5f01

View file

@ -1086,13 +1086,13 @@ class FormHelper extends AppHelper {
unset($options['options']);
return $this->select($fieldName, $list, $options);
case 'time':
$options['value'] = $selected;
$options += array('value' => $selected);
return $this->dateTime($fieldName, null, $timeFormat, $options);
case 'date':
$options['value'] = $selected;
$options += array('value' => $selected);
return $this->dateTime($fieldName, $dateFormat, null, $options);
case 'datetime':
$options['value'] = $selected;
$options += array('value' => $selected);
return $this->dateTime($fieldName, $dateFormat, $timeFormat, $options);
case 'textarea':
return $this->textarea($fieldName, $options + array('cols' => '30', 'rows' => '6'));