mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Give DatetimeField its own template (which is extensible)
This commit is contained in:
parent
0ddf3b4186
commit
cc749d3a19
@ -109,13 +109,7 @@ class DatetimeField extends FormField {
|
|||||||
*/
|
*/
|
||||||
public function Field($properties = array()) {
|
public function Field($properties = array()) {
|
||||||
Requirements::css(FRAMEWORK_DIR . '/css/DatetimeField.css');
|
Requirements::css(FRAMEWORK_DIR . '/css/DatetimeField.css');
|
||||||
|
return parent::Field($properties);
|
||||||
$tzField = ($this->getConfig('usertimezone')) ? $this->timezoneField->FieldHolder() : '';
|
|
||||||
return DBField::create_field('HTMLText', $this->dateField->FieldHolder() .
|
|
||||||
$this->timeField->FieldHolder() .
|
|
||||||
$tzField .
|
|
||||||
'<div class="clear"><!-- --></div>'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
6
templates/forms/DatetimeField.ss
Normal file
6
templates/forms/DatetimeField.ss
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
$DateField.FieldHolder
|
||||||
|
$TimeField.FieldHolder
|
||||||
|
<% if $getConfig('usertimezone') %>
|
||||||
|
$TimezoneField.FieldHolder
|
||||||
|
<% end_if %>
|
||||||
|
<div class="clear"><!-- --></div>
|
Loading…
Reference in New Issue
Block a user