mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX Page History 'Comparing versions' banner missing
The 'Comparing versions' banner was inserted before the "Title" field. If there is no "Title" field the banner is missing. If the "Title" field isn't the first field then the banner is in the incorrect place.
This commit is contained in:
parent
5bd7662cb4
commit
c5fb7127ac
@ -174,13 +174,12 @@ class CMSPageHistoryController extends CMSMain {
|
||||
}
|
||||
}
|
||||
|
||||
$fields->addFieldToTab('Root.Main',
|
||||
new LiteralField('CurrentlyViewingMessage', ArrayData::create(array(
|
||||
'Content' => DBField::create_field('HTMLFragment', $message),
|
||||
'Classes' => 'notice'
|
||||
))->renderWith($this->getTemplatesWithSuffix('_notice'))),
|
||||
"Title"
|
||||
);
|
||||
$fields->fieldByName('Root.Main')->unshift(
|
||||
new LiteralField('CurrentlyViewingMessage', ArrayData::create(array(
|
||||
'Content' => DBField::create_field('HTMLFragment', $message),
|
||||
'Classes' => 'notice'
|
||||
))->renderWith($this->getTemplatesWithSuffix('_notice')))
|
||||
);
|
||||
|
||||
$form->setFields($fields->makeReadonly());
|
||||
$form->loadDataFrom(array(
|
||||
|
Loading…
Reference in New Issue
Block a user