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:
Ingo Schommer 2008-12-14 21:25:19 +00:00 committed by Sam Minnee
parent 66be81326d
commit d635f0ead2

View File

@ -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;
}