[Form] Added options for separate date/time labels in DateTimeType.
This commit is contained in:
parent
d29fc2ca9e
commit
df191552b4
@ -142,10 +142,18 @@ class DateTimeType extends AbstractType
|
|||||||
$dateOptions['widget'] = $options['date_widget'];
|
$dateOptions['widget'] = $options['date_widget'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null !== $options['date_label']) {
|
||||||
|
$dateOptions['label'] = $options['date_label'];
|
||||||
|
}
|
||||||
|
|
||||||
if (null !== $options['time_widget']) {
|
if (null !== $options['time_widget']) {
|
||||||
$timeOptions['widget'] = $options['time_widget'];
|
$timeOptions['widget'] = $options['time_widget'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null !== $options['time_label']) {
|
||||||
|
$timeOptions['label'] = $options['time_label'];
|
||||||
|
}
|
||||||
|
|
||||||
if (null !== $options['date_format']) {
|
if (null !== $options['date_format']) {
|
||||||
$dateOptions['format'] = $options['date_format'];
|
$dateOptions['format'] = $options['date_format'];
|
||||||
}
|
}
|
||||||
@ -238,6 +246,8 @@ class DateTimeType extends AbstractType
|
|||||||
// this option.
|
// this option.
|
||||||
'data_class' => null,
|
'data_class' => null,
|
||||||
'compound' => $compound,
|
'compound' => $compound,
|
||||||
|
'date_label' => null,
|
||||||
|
'time_label' => null,
|
||||||
));
|
));
|
||||||
|
|
||||||
// Don't add some defaults in order to preserve the defaults
|
// Don't add some defaults in order to preserve the defaults
|
||||||
|
Reference in New Issue
Block a user