Add archive to list of validation-exempt actions

This commit is contained in:
Loz Calver 2017-07-05 10:29:56 +01:00
parent 1c195230bd
commit 5caef27577

View File

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