mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Limiting readonly transformation of form in CMSMain->EditForm() to fields only (excluding actions). FormAction readonly transformations were fixed a while ago, which meant that they were actually enforced now, causing unavailable cms actions in certain scenarios (e.g. with a page deleted from live, which should make the fields readonly, but leave buttons functional)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68754 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7b2fe32587
commit
9845cadb3b
@ -421,7 +421,10 @@ JS;
|
||||
$form->loadDataFrom($record);
|
||||
$form->disableDefaultAction();
|
||||
|
||||
if(!$record->canEdit() || $record->DeletedFromStage) $form->makeReadonly();
|
||||
if(!$record->canEdit() || $record->DeletedFromStage) {
|
||||
$readonlyFields = $form->Fields()->makeReadonly();
|
||||
$form->setFields($readonlyFields);
|
||||
}
|
||||
|
||||
return $form;
|
||||
} else if($id) {
|
||||
|
Loading…
Reference in New Issue
Block a user