mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
enable validation to GenericDataAdmin form
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@40754 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
15d8a4b8f6
commit
23a2a46532
@ -186,8 +186,9 @@ abstract class GenericDataAdmin extends LeftAndMain {
|
||||
if(!$actions->fieldByName('action_delete')) {
|
||||
$actions->push(new FormAction('delete', 'Delete','ajaxAction-delete'));
|
||||
}
|
||||
$form = new Form($this, "EditForm", $fields, $actions);
|
||||
|
||||
$required = (method_exists($genericData, getCMSRequiredField)) ? $genericData->getCMSRequiredField() : new RequiredFields();
|
||||
$form = new Form($this, "EditForm", $fields, $actions, $required);
|
||||
if($this->stat('data_type_extra')) {
|
||||
foreach ($this->stat('data_type_extra') as $oneRelated) {
|
||||
$oneExtra = $genericData-> $oneRelated();
|
||||
|
Loading…
x
Reference in New Issue
Block a user