From 6d5a49e59ec098d3eb85ce1c2fa394a7067052dd Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Fri, 19 Oct 2007 01:42:14 +0000 Subject: [PATCH] #105 - FormAction $extraClass usage git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43606 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index cd8bc9b3a..46708deae 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1062,15 +1062,19 @@ class SiteTree extends DataObject { $actions = array(); if($this->isPublished() && $this->canPublish()) { - $actions[] = FormAction::create('unpublish', 'Unpublish', 'delete') - ->describe("Remove this page from the published site"); + $unpublish = FormAction::create('unpublish', 'Unpublish', 'delete'); + $unpublish->describe("Remove this page from the published site"); + $unpublish->addExtraClass('delete'); + $actions[] = $unpublish; } if($this->stagesDiffer('Stage', 'Live')) { if($this->isPublished() && $this->canEdit()) { - $actions[] = FormAction::create('rollback', 'Cancel draft changes', 'delete') - ->describe("Delete your draft and revert to the currently published page"); + $rollback = FormAction::create('rollback', 'Cancel draft changes', 'delete'); + $rollback->describe("Delete your draft and revert to the currently published page"); + $rollback->addExtraClass('delete'); + $actions[] = $rollback; } }