mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
APICHANG: if a DataObject has getCMSActions, its model admin should be able to add them.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66392 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0b1392a688
commit
018e153197
@ -719,9 +719,8 @@ class ModelAdmin_RecordController extends Controller {
|
||||
|
||||
$validator = ($this->currentRecord->hasMethod('getCMSValidator')) ? $this->currentRecord->getCMSValidator() : null;
|
||||
|
||||
$actions = new FieldSet(
|
||||
new FormAction("doSave", _t('ModelAdmin.SAVE', "Save"))
|
||||
);
|
||||
$actions = $this->currentRecord->getCMSActions();
|
||||
$actions->push(new FormAction("doSave", _t('ModelAdmin.SAVE', "Save")));
|
||||
|
||||
if($this->currentRecord->canDelete(Member::currentUser())) {
|
||||
$actions->insertFirst($deleteAction = new FormAction('doDelete', _t('ModelAdmin.DELETE', 'Delete')));
|
||||
|
Loading…
Reference in New Issue
Block a user