mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Adding temporary preview view to CMSPageEditController->getEditForm()
This commit is contained in:
parent
e33576d23e
commit
42b31d4410
@ -7,7 +7,15 @@ class CMSPageEditController extends CMSMain {
|
|||||||
|
|
||||||
function getEditForm($id = null, $fields = null) {
|
function getEditForm($id = null, $fields = null) {
|
||||||
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
||||||
return parent::getEditForm($record, ($record) ? $record->getCMSFields() : null);
|
$form = parent::getEditForm($record, ($record) ? $record->getCMSFields() : null);
|
||||||
|
|
||||||
|
// TODO Replace with preview button
|
||||||
|
$form->Fields()->addFieldToTab(
|
||||||
|
'Root.Main',
|
||||||
|
new LiteralField('SwitchView', sprintf('<div class="cms-switch-view field"><label>Preview:</label><div class="middleColumn">%s</div></div>', $this->SwitchView()))
|
||||||
|
);
|
||||||
|
|
||||||
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user