mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6696 from robbieaverill/bugfix/datetime-field-has-template
FIX Give DatetimeField its own template (which is extensible)
This commit is contained in:
commit
ae03d18d91
@ -109,13 +109,7 @@ class DatetimeField extends FormField {
|
||||
*/
|
||||
public function Field($properties = array()) {
|
||||
Requirements::css(FRAMEWORK_DIR . '/css/DatetimeField.css');
|
||||
|
||||
$tzField = ($this->getConfig('usertimezone')) ? $this->timezoneField->FieldHolder() : '';
|
||||
return DBField::create_field('HTMLText', $this->dateField->FieldHolder() .
|
||||
$this->timeField->FieldHolder() .
|
||||
$tzField .
|
||||
'<div class="clear"><!-- --></div>'
|
||||
);
|
||||
return parent::Field($properties);
|
||||
}
|
||||
|
||||
/**
|
||||
|
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