FIX Don't validate pages when restoring or reverting (fixes #2449)

Use new method
This commit is contained in:
Loz Calver 2013-10-03 11:25:05 +01:00
parent 0aae86b467
commit 66bfff4d15

View File

@ -634,6 +634,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$form->addExtraClass('center ' . $this->BaseCSSClasses());
// if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
// Set validation exemptions for specific actions
$form->setValidationExemptActions(array('restore', 'revert', 'deletefromlive', 'rollback'));
// Announce the capability so the frontend can decide whether to allow preview or not.
if(in_array('CMSPreviewable', class_implements($record))) {