NEW Test FieldGroup

This commit is contained in:
Ingo Schommer 2013-01-16 10:30:00 +01:00
parent 432cc44a30
commit 52e8bc13a7

View File

@ -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;
} }