mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Adding SilverStripe navigator to CMSMain->getEditForm() if not already present through LeftandMain->getEditForm() (in case custom $fields parameter is passed into the method)
This commit is contained in:
parent
4eebf7f0be
commit
aefda19ffa
@ -431,6 +431,13 @@ JS;
|
||||
$stageURLField->setValue(Controller::join_links($record->AbsoluteLink(), '?Stage=stage'));
|
||||
}
|
||||
|
||||
// Added in-line to the form, but plucked into different view by LeftAndMain.Preview.js upon load
|
||||
if(in_array('CMSPreviewable', class_implements($record)) && !$fields->fieldByName('SilverStripeNavigator')) {
|
||||
$navField = new LiteralField('SilverStripeNavigator', $this->getSilverStripeNavigator());
|
||||
$navField->setAllowHTML(true);
|
||||
$fields->push($navField);
|
||||
}
|
||||
|
||||
// getAllCMSActions can be used to completely redefine the action list
|
||||
if($record->hasMethod('getAllCMSActions')) {
|
||||
$actions = $record->getAllCMSActions();
|
||||
|
Loading…
Reference in New Issue
Block a user