mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Setting $this->request in ModelAdmin_RecordController->edit() instead of returning new response, so it can be altered by subclasses
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@114144 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c579822340
commit
65b3b145f1
@ -913,14 +913,15 @@ class ModelAdmin_RecordController extends Controller {
|
||||
function edit($request) {
|
||||
if ($this->currentRecord) {
|
||||
if($this->isAjax()) {
|
||||
return new SS_HTTPResponse(
|
||||
$this->EditForm()->formHtmlContent(),
|
||||
$this->response->setBody($this->EditForm()->formHtmlContent());
|
||||
$this->response->setStatusCode(
|
||||
200,
|
||||
sprintf(
|
||||
_t('ModelAdmin.LOADEDFOREDITING', "Loaded '%s' for editing."),
|
||||
$this->currentRecord->Title
|
||||
)
|
||||
);
|
||||
return $this->response;
|
||||
} else {
|
||||
// This is really quite ugly; to fix will require a change in the way that customise() works. :-(
|
||||
return $this->parentController->parentController->customise(array(
|
||||
@ -928,7 +929,6 @@ class ModelAdmin_RecordController extends Controller {
|
||||
'EditForm' => $this->EditForm()
|
||||
))->renderWith(array("{$this->class}_right",'LeftAndMain_right'))
|
||||
))->renderWith(array('ModelAdmin','LeftAndMain'));
|
||||
return ;
|
||||
}
|
||||
} else {
|
||||
return _t('ModelAdmin.ITEMNOTFOUND', "I can't find that item");
|
||||
|
Loading…
Reference in New Issue
Block a user