Skip to content
Browse files

MINOR Making page drop down searchable on CMS add form, and ensuring …

…that the default page option is showing first
  • Loading branch information...
1 parent bb7edf8 commit 167bc045fe3951965f5df7f10c5370f5b7be643c @chillu chillu committed Jan 5, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 code/controllers/CMSMain.php
View
6 code/controllers/CMSMain.php
@@ -1061,6 +1061,11 @@ function AddForm() {
);
$pageTypes[$type->getField('ClassName')] = $html;
}
+ // Ensure generic page type shows on top
+ if(isset($pageTypes['Page'])) {
+ $pageTitle = $pageTypes['Page'];
+ $pageTypes = array_merge(array('Page' => $pageTitle), $pageTypes);
+ }
$numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><span class="title">%s</span></span>';
$fields = new FieldList(
@@ -1079,6 +1084,7 @@ function AddForm() {
'Page'
)
);
+ $parentField->setShowSearch(true);
$parentField->setValue(($record) ? $record->ID : null);
$actions = new FieldList(

0 comments on commit 167bc04

Please sign in to comment.
Something went wrong with that request. Please try again.