From 2632cdf84bfbb09751bbf7e4c9fae2d20a714e98 Mon Sep 17 00:00:00 2001 From: Gorrie Coe Date: Tue, 1 May 2018 13:38:45 +1200 Subject: [PATCH] Fixed issue with missing template --- src/forms/HistoryGridFieldItemRequest.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/forms/HistoryGridFieldItemRequest.php b/src/forms/HistoryGridFieldItemRequest.php index 6eb0d83..34f0fb1 100644 --- a/src/forms/HistoryGridFieldItemRequest.php +++ b/src/forms/HistoryGridFieldItemRequest.php @@ -2,7 +2,6 @@ namespace gorriecoe\DataObjectHistory\Forms; use SilverStripe\Forms\FieldList; -use SilverStripe\Forms\LiteralField; use SilverStripe\Forms\HiddenField; use SilverStripe\Forms\ReadonlyField; use SilverStripe\Forms\FormAction; @@ -100,17 +99,10 @@ public function ItemEditForm() ); } - $fields->unshift( - LiteralField::create( - 'CurrentlyViewingMessage', - ArrayData::create([ - 'Content' => DBField::create_field('HTMLFragment', $message), - 'Classes' => 'notice' - ]) - ->renderWith('Silverstripe\\CMS\\Controllers\\Includes\\CMSMain_notice') - ) + $form->sessionMessage( + DBField::create_field('HTMLFragment', $message), + 'notice' ); - $form->setFields($fields); return $form; }