mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Making page drop down searchable on CMS add form, and ensuring that the default page option is showing first
This commit is contained in:
parent
bb7edf8bfd
commit
167bc045fe
@ -1061,6 +1061,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
);
|
);
|
||||||
$pageTypes[$type->getField('ClassName')] = $html;
|
$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>';
|
$numericLabelTmpl = '<span class="step-label"><span class="flyout">%d</span><span class="arrow"></span><span class="title">%s</span></span>';
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
@ -1079,6 +1084,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
'Page'
|
'Page'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$parentField->setShowSearch(true);
|
||||||
$parentField->setValue(($record) ? $record->ID : null);
|
$parentField->setValue(($record) ? $record->ID : null);
|
||||||
|
|
||||||
$actions = new FieldList(
|
$actions = new FieldList(
|
||||||
|
Loading…
Reference in New Issue
Block a user