mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Making only formfields readonly (not formactions) when comparing versions and showing historical versions within CMSMain
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68810 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
66be81326d
commit
d635f0ead2
@ -735,7 +735,10 @@ JS;
|
||||
"ID" => $id,
|
||||
"Version" => $version,
|
||||
));
|
||||
$form->makeReadonly();
|
||||
|
||||
// historical version shouldn't be editable
|
||||
$readonlyFields = $form->Fields()->makeReadonly();
|
||||
$form->setFields($readonlyFields);
|
||||
|
||||
$templateData = $this->customise(array(
|
||||
"EditForm" => $form
|
||||
@ -779,7 +782,11 @@ JS;
|
||||
"ID" => $id,
|
||||
"Version" => $fromVersion,
|
||||
));
|
||||
$form->makeReadonly();
|
||||
|
||||
// comparison views shouldn't be editable
|
||||
$readonlyFields = $form->Fields()->makeReadonly();
|
||||
$form->setFields($readonlyFields);
|
||||
|
||||
foreach($form->Fields()->dataFields() as $field) {
|
||||
$field->dontEscape = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user