Skip to content

Commit

Permalink
API Update code to reflect changes to LeftAndMain
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Nov 28, 2024
1 parent aac7023 commit 73cbd8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Controllers/CMSPageHistoryViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\HiddenField;
use SilverStripe\VersionedAdmin\Forms\HistoryViewerField;

Expand All @@ -29,9 +30,9 @@ class CMSPageHistoryViewerController extends CMSMain

private static $ignore_menuitem = true;

public function getEditForm($id = null, $fields = null)
public function getEditForm($id = null, $fields = null): Form
{
$record = $this->getRecord($id ?: $this->currentPageID());
$record = $this->getRecord($id ?: $this->currentRecordID());

$form = parent::getEditForm($id);
$form->addExtraClass('history-viewer__form');
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/features/restore-to-draft.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Feature: Restore to draft
Then I press the "Restore to draft" button
Then I should see "Successfully restored the page" in the "#Form_EditForm" element
When I go to "/admin/pages"
And I should see "MyPage" in the ".cms-tree [data-pagetype='Page']:nth-of-type(2).status-addedtodraft" element
And I should see "MyPage" in the ".cms-tree [data-recordtype='Page']:nth-of-type(2).status-addedtodraft" element

0 comments on commit 73cbd8d

Please sign in to comment.