Skip to content

Commit

Permalink
Correct insertAfter order
Browse files Browse the repository at this point in the history
  • Loading branch information
purplespider authored Sep 12, 2024
1 parent 820f953 commit 92f3797
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions code/FilePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 92f3797

Please sign in to comment.