mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Make employe fields untabbed to test flat forms
This commit is contained in:
parent
c9ba0d6c1d
commit
26b8dcd39f
@ -36,23 +36,10 @@ class Employee extends DataObject
|
|||||||
|
|
||||||
public function getCMSFields()
|
public function getCMSFields()
|
||||||
{
|
{
|
||||||
$fields = parent::getCMSFields();
|
// Use basic scaffolder (no tabs)
|
||||||
|
$fields = $this->scaffoldFormFields();
|
||||||
if (method_exists('SilverStripe\\ORM\\ManyManyList', 'getExtraFields')) {
|
$fields->push(new NumericField('ManyMany[YearStart]', 'Year started (3.1, many-many only)'));
|
||||||
$fields->addFieldToTab('Root.Main',
|
$fields->push(new TextField('ManyMany[Role]', 'Role (3.1, many-many only)'));
|
||||||
new NumericField('ManyMany[YearStart]', 'Year started (3.1, many-many only)')
|
|
||||||
);
|
|
||||||
$fields->addFieldToTab('Root.Main',
|
|
||||||
new TextField('ManyMany[Role]', 'Role (3.1, many-many only)')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3.1 only
|
|
||||||
if (method_exists('UploadField', 'setAllowedFileCategories')) {
|
|
||||||
$fields->dataFieldByName('ProfileImageID')->setAllowedFileCategories('image');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user