mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Use of DropdownField in CMS should call setEmptyString instead of
use the $emptyString argument, as it's deprecated.
This commit is contained in:
parent
542d727db2
commit
d9ee61c4a3
@ -313,15 +313,15 @@ JS
|
|||||||
'zip' => _t('AssetAdmin.AppCategoryArchive', 'Archive', 'A collection of files'),
|
'zip' => _t('AssetAdmin.AppCategoryArchive', 'Archive', 'A collection of files'),
|
||||||
);
|
);
|
||||||
$context->addField(
|
$context->addField(
|
||||||
new DropdownField(
|
$typeDropdown = new DropdownField(
|
||||||
'q[AppCategory]',
|
'q[AppCategory]',
|
||||||
_t('AssetAdmin.Filetype', 'File type'),
|
_t('AssetAdmin.Filetype', 'File type'),
|
||||||
$appCategories,
|
$appCategories
|
||||||
null,
|
|
||||||
null,
|
|
||||||
' '
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$typeDropdown->setEmptyString(' ');
|
||||||
|
|
||||||
$context->addField(
|
$context->addField(
|
||||||
new CheckboxField('q[CurrentFolderOnly]', _t('AssetAdmin.CurrentFolderOnly', 'Limit to current folder?'))
|
new CheckboxField('q[CurrentFolderOnly]', _t('AssetAdmin.CurrentFolderOnly', 'Limit to current folder?'))
|
||||||
);
|
);
|
||||||
|
@ -284,19 +284,17 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
_t('CMSMain.PAGES', 'Pages'),
|
_t('CMSMain.PAGES', 'Pages'),
|
||||||
$filterMap
|
$filterMap
|
||||||
),
|
),
|
||||||
new DropdownField(
|
$classDropdown = new DropdownField(
|
||||||
'q[ClassName]',
|
'q[ClassName]',
|
||||||
_t('CMSMain.PAGETYPEOPT','Page Type', 'Dropdown for limiting search to a page type'),
|
_t('CMSMain.PAGETYPEOPT','Page Type', 'Dropdown for limiting search to a page type'),
|
||||||
$pageTypes,
|
$pageTypes
|
||||||
null,
|
|
||||||
null,
|
|
||||||
_t('CMSMain.PAGETYPEANYOPT','Any')
|
|
||||||
)
|
)
|
||||||
// new TextField('MetaTags', _t('CMSMain.SearchMetaTags', 'Meta tags'))
|
// new TextField('MetaTags', _t('CMSMain.SearchMetaTags', 'Meta tags'))
|
||||||
);
|
);
|
||||||
$dateGroup->subfieldParam = 'FieldHolder';
|
$dateGroup->subfieldParam = 'FieldHolder';
|
||||||
$dateFrom->setConfig('showcalendar', true);
|
$dateFrom->setConfig('showcalendar', true);
|
||||||
$dateTo->setConfig('showcalendar', true);
|
$dateTo->setConfig('showcalendar', true);
|
||||||
|
$classDropdown->setEmptyString(_t('CMSMain.PAGETYPEANYOPT','Any'));
|
||||||
|
|
||||||
$actions = new FieldList(
|
$actions = new FieldList(
|
||||||
FormAction::create('doSearch', _t('CMSMain_left.ss.APPLY FILTER', 'Apply Filter'))
|
FormAction::create('doSearch', _t('CMSMain_left.ss.APPLY FILTER', 'Apply Filter'))
|
||||||
|
Loading…
Reference in New Issue
Block a user