mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX #6939: fixed bug that disable a newly created page from doing futher action and left hand menu lost js handler
This commit is contained in:
parent
f56e39e521
commit
50b4605b30
@ -123,14 +123,14 @@ class CMSPageAddController extends CMSPageEditController {
|
||||
$record = $this->getNewItem("new-$className-$parentID".$suffix, false);
|
||||
if(class_exists('Translatable') && $record->hasExtension('Translatable')) $record->Locale = $data['Locale'];
|
||||
$record->write();
|
||||
|
||||
$this->setCurrentPageID($record->ID);
|
||||
$editController = singleton('CMSPageEditController');
|
||||
$editController->setCurrentPageID($record->ID);
|
||||
|
||||
$link = Controller::join_links(singleton('CMSPageEditController')->Link('show'), $record->ID);
|
||||
$this->getResponse()->addHeader('X-ControllerURL', $link);
|
||||
|
||||
if(Director::is_ajax()) {
|
||||
return $this->renderWith(array_pop($this->getTemplatesWithSuffix('_Content')));
|
||||
return $editController->renderWith(array_pop($editController->getTemplatesWithSuffix('_Content')));
|
||||
} else {
|
||||
return $this->redirect($link);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user