mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
ENHANCEMENT Added disabled date/time fields to "basic fields test page"
This commit is contained in:
parent
02e3bcabb4
commit
ffc2f85b9d
@ -10,6 +10,8 @@ class BasicFieldsTestPage extends TestPage {
|
|||||||
'CompositeDate' => 'Date',
|
'CompositeDate' => 'Date',
|
||||||
'Date' => 'Date',
|
'Date' => 'Date',
|
||||||
"DateDisabled" => "Date",
|
"DateDisabled" => "Date",
|
||||||
|
'TimeDisabled' => 'Time',
|
||||||
|
'DateTimeDisabled' => 'Datetime',
|
||||||
'DMYCalendarDate' => 'Date',
|
'DMYCalendarDate' => 'Date',
|
||||||
'DMYDate' => 'Date',
|
'DMYDate' => 'Date',
|
||||||
'DateTime' => 'Datetime',
|
'DateTime' => 'Datetime',
|
||||||
@ -49,6 +51,8 @@ class BasicFieldsTestPage extends TestPage {
|
|||||||
static $defaults = array(
|
static $defaults = array(
|
||||||
'Readonly' => 'Default value for \'readonly\'',
|
'Readonly' => 'Default value for \'readonly\'',
|
||||||
"DateDisabled" => "2002-10-23",
|
"DateDisabled" => "2002-10-23",
|
||||||
|
"DateTimeDisabled" => "2002-10-23 23:59",
|
||||||
|
"TimeDisabled" => "23:59",
|
||||||
);
|
);
|
||||||
|
|
||||||
function getCMSFields() {
|
function getCMSFields() {
|
||||||
@ -90,11 +94,13 @@ class BasicFieldsTestPage extends TestPage {
|
|||||||
$fields->addFieldsToTab('Root.Content.DateTimeTests', array(
|
$fields->addFieldsToTab('Root.Content.DateTimeTests', array(
|
||||||
$calendarDateField = new DateField('CalendarDate','DateField with calendar'),
|
$calendarDateField = new DateField('CalendarDate','DateField with calendar'),
|
||||||
new DateField('Date','DateField'),
|
new DateField('Date','DateField'),
|
||||||
new DateField_Disabled("DateDisabled","DateField_Disabled (should be 2002-10-23)"),
|
new DateField_Disabled("DateDisabled","DateField (disabled)"),
|
||||||
$dmyDateField = new DateField('DMYDate','DateField with separate fields'),
|
$dmyDateField = new DateField('DMYDate','DateField with separate fields'),
|
||||||
new TimeField('Time','TimeField'),
|
new TimeField('Time','TimeField'),
|
||||||
|
new TimeField_Readonly('TimeDisabled','TimeField (disabled)'),
|
||||||
$timeFieldDropdown = new TimeField('TimeDropdown','TimeField with dropdown'),
|
$timeFieldDropdown = new TimeField('TimeDropdown','TimeField with dropdown'),
|
||||||
new DatetimeField('DateTime', 'DateTime'),
|
new DatetimeField('DateTime', 'DateTime'),
|
||||||
|
new DatetimeField_Readonly('DateTimeDisabled', 'DateTime (disabled)'),
|
||||||
$dateTimeShowCalendar = new DatetimeField('DateTimeWithCalendar', 'DateTime with calendar')
|
$dateTimeShowCalendar = new DatetimeField('DateTimeWithCalendar', 'DateTime with calendar')
|
||||||
));
|
));
|
||||||
$calendarDateField->setConfig('showcalendar', true);
|
$calendarDateField->setConfig('showcalendar', true);
|
||||||
|
Loading…
Reference in New Issue
Block a user