mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
MINOR Only fetching EditForm in LeftAndMain->show() if called by ajax, the customize() call for non-ajax views confuses the renderer otherwise
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92847 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f793ffd368
commit
1bc268e287
@ -336,16 +336,13 @@ class LeftAndMain extends Controller {
|
||||
// TODO Necessary for TableListField URLs to work properly
|
||||
if($request->param('ID')) $this->setCurrentPageID($request->param('ID'));
|
||||
|
||||
$form = $this->getEditForm($request->param('ID'));
|
||||
|
||||
if(Director::is_ajax()) {
|
||||
SSViewer::setOption('rewriteHashlinks', false);
|
||||
$form = $this->getEditForm($request->param('ID'));
|
||||
return $form->formHtmlContent();
|
||||
} else {
|
||||
// Rendering is handled by template, which will call EditForm() eventually
|
||||
return $this->customise(array(
|
||||
'EditForm' => $form
|
||||
))->renderWith($this->getViewer('show'));
|
||||
return $this->renderWith($this->getViewer('show'));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user