mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Adding ParentID and ClassName fields in LeftAndMain->getEditForm() if they're not already present. This ensures the UI can update state properly, e.g. to set the current tree element
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92836 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d732ee4c26
commit
c44bc29a8f
@ -757,6 +757,18 @@ JS;
|
||||
);
|
||||
}
|
||||
|
||||
// Add hidden fields which are required for saving the record
|
||||
// and loading the UI state
|
||||
if(!$fields->dataFieldByName('ClassName')) {
|
||||
$fields->push(new HiddenField('ClassName'));
|
||||
}
|
||||
if(
|
||||
Object::has_extension($this->stat('tree_class'), 'Hierarchy')
|
||||
&& !$fields->dataFieldByName('ParentID')
|
||||
) {
|
||||
$fields->push(new HiddenField('ParentID'));
|
||||
}
|
||||
|
||||
if($record->hasMethod('getAllCMSActions')) {
|
||||
$actions = $record->getAllCMSActions();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user