mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Removed duplciate success status feedback on CMS save/publish
We now have the CMS actions with two states for communicating that they've saved correctly.
This commit is contained in:
parent
26cc14a930
commit
1d470fe718
@ -857,24 +857,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
// If the 'Save & Publish' button was clicked, also publish the page
|
// If the 'Save & Publish' button was clicked, also publish the page
|
||||||
if (isset($data['publish']) && $data['publish'] == 1) {
|
if (isset($data['publish']) && $data['publish'] == 1) {
|
||||||
$record->doPublish();
|
$record->doPublish();
|
||||||
|
|
||||||
// Update classname with original and get new instance (see above for explanation)
|
|
||||||
if(isset($data['ClassName'])) {
|
|
||||||
$record->setClassName($data['ClassName']);
|
|
||||||
$publishedRecord = $record->newClassInstance($record->ClassName);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->response->addHeader(
|
|
||||||
'X-Status',
|
|
||||||
rawurlencode(_t(
|
|
||||||
'LeftAndMain.STATUSPUBLISHEDSUCCESS',
|
|
||||||
"Published '{title}' successfully",
|
|
||||||
'Status message after publishing a page, showing the page title',
|
|
||||||
array('title' => $record->Title)
|
|
||||||
))
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$this->response->addHeader('X-Status', rawurlencode(_t('LeftAndMain.SAVEDUP', 'Saved.')));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getResponseNegotiator()->respond($this->request);
|
return $this->getResponseNegotiator()->respond($this->request);
|
||||||
|
Loading…
Reference in New Issue
Block a user