mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX Restore button now has warning colour and correct icon
This commit is contained in:
parent
6acaa0cd27
commit
e80c7e712b
@ -2267,7 +2267,11 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
||||
|
||||
// "restore"
|
||||
if ($canEdit && !$isOnDraft && $isPublished) {
|
||||
$majorActions->push(FormAction::create('revert', _t('SilverStripe\\CMS\\Controllers\\CMSMain.RESTORE', 'Restore')));
|
||||
$majorActions->push(
|
||||
FormAction::create('revert', _t('SilverStripe\\CMS\\Controllers\\CMSMain.RESTORE', 'Restore'))
|
||||
->addExtraClass('btn-warning font-icon-back-in-time')
|
||||
->setUseButtonTag(true)
|
||||
);
|
||||
}
|
||||
|
||||
// Check if we can restore a deleted page
|
||||
|
@ -218,7 +218,7 @@ class CMSMainTest extends FunctionalTest
|
||||
$this->assertTrue($livePage->canDelete());
|
||||
|
||||
// Check that the 'restore' button exists as a simple way of checking that the correct page is returned.
|
||||
$this->assertRegExp('/<input type="submit"[^>]+name="action_(restore|revert)"/i', $response->getBody());
|
||||
$this->assertRegExp('/<button type="submit"[^>]+name="action_(restore|revert)"/i', $response->getBody());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user