mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
NEW Test FieldGroup
This commit is contained in:
parent
432cc44a30
commit
52e8bc13a7
@ -112,7 +112,7 @@ class BasicFieldsTestPage extends TestPage {
|
|||||||
Object::create('PasswordField', 'Password', 'PasswordField'),
|
Object::create('PasswordField', 'Password', 'PasswordField'),
|
||||||
Object::create('AjaxUniqueTextField', 'AjaxUniqueText',
|
Object::create('AjaxUniqueTextField', 'AjaxUniqueText',
|
||||||
'AjaxUniqueTextField', 'AjaxUniqueText', 'BasicFieldsTestPage'
|
'AjaxUniqueTextField', 'AjaxUniqueText', 'BasicFieldsTestPage'
|
||||||
),
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
$fields->addFieldsToTab('Root.Numeric', array(
|
$fields->addFieldsToTab('Root.Numeric', array(
|
||||||
@ -205,6 +205,24 @@ class BasicFieldsTestPage extends TestPage {
|
|||||||
$noLabelField->setDescription($description);
|
$noLabelField->setDescription($description);
|
||||||
$fields->addFieldToTab('Root.Text', $noLabelField, 'Text_disabled');
|
$fields->addFieldToTab('Root.Text', $noLabelField, 'Text_disabled');
|
||||||
|
|
||||||
|
$fields->addFieldToTab('Root.Text',
|
||||||
|
FieldGroup::create(
|
||||||
|
TextField::create('MyFieldGroup1'),
|
||||||
|
TextField::create('MyFieldGroup2'),
|
||||||
|
DropdownField::create('MyFieldGroup3', false, TestCategory::map())
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$fields->addFieldToTab('Root.Text',
|
||||||
|
FieldGroup::create(
|
||||||
|
'MyLabelledFieldGroup',
|
||||||
|
array(
|
||||||
|
TextField::create('MyLabelledFieldGroup1'),
|
||||||
|
TextField::create('MyLabelledFieldGroup2'),
|
||||||
|
DropdownField::create('MyLabelledFieldGroup3', null, TestCategory::map())
|
||||||
|
)
|
||||||
|
)->setTitle('My Labelled Field Group')
|
||||||
|
);
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user