From 92f37975a538f0807f440ead9f072a3944b1acda Mon Sep 17 00:00:00 2001 From: James Cocker Date: Thu, 12 Sep 2024 13:57:28 +0100 Subject: [PATCH] Correct insertAfter order --- code/FilePage.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/FilePage.php b/code/FilePage.php index 999a497..3f98d9e 100644 --- a/code/FilePage.php +++ b/code/FilePage.php @@ -69,24 +69,24 @@ public function getCMSFields() } $fields->insertAfter( + 'Content', TextField::create( "FilesHeading", "Files Heading" - ), - 'Content' + ) ); $fields->insertAfter( + 'FilesHeading', $dropdown = TreeDropdownField::create( "FolderID", $this->fieldLabel("Folder"), Folder::class - ), - 'FilesHeading' + ) ); - $fields->insertAfter(DropdownField::create('SortSubFolders', 'Sub Folder Sort', singleton(FilePage::class)->dbObject('SortSubFolders')->enumValues()),'FolderID'); - $fields->insertAfter(DropdownField::create('SortTopLevel', 'Top Level Sort', singleton(FilePage::class)->dbObject('SortTopLevel')->enumValues()),'FolderID'); + $fields->insertAfter('FolderID', DropdownField::create('SortSubFolders', 'Sub Folder Sort', singleton(FilePage::class)->dbObject('SortSubFolders')->enumValues())); + $fields->insertAfter('FolderID', DropdownField::create('SortTopLevel', 'Top Level Sort', singleton(FilePage::class)->dbObject('SortTopLevel')->enumValues())); if ($this->FolderID) {