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:
Damian Mooyman 2017-03-13 13:05:32 +13:00 committed by GitHub
commit ae03d18d91
2 changed files with 7 additions and 7 deletions

View File

@ -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);
}
/**

View File

@ -0,0 +1,6 @@
$DateField.FieldHolder
$TimeField.FieldHolder
<% if $getConfig('usertimezone') %>
$TimezoneField.FieldHolder
<% end_if %>
<div class="clear"><!-- --></div>