mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Set locale on datefields from current user
This commit is contained in:
parent
2fbeda1564
commit
0f00de78ad
@ -922,11 +922,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
$dateFrom = DateField::create(
|
$dateFrom = DateField::create(
|
||||||
'LastEditedFrom',
|
'LastEditedFrom',
|
||||||
_t('SilverStripe\\CMS\\Search\\SearchForm.FILTERDATEFROM', 'From')
|
_t('SilverStripe\\CMS\\Search\\SearchForm.FILTERDATEFROM', 'From')
|
||||||
);
|
)->setLocale(Security::getCurrentUser()->Locale);
|
||||||
$dateTo = DateField::create(
|
$dateTo = DateField::create(
|
||||||
'LastEditedTo',
|
'LastEditedTo',
|
||||||
_t('SilverStripe\\CMS\\Search\\SearchForm.FILTERDATETO', 'To')
|
_t('SilverStripe\\CMS\\Search\\SearchForm.FILTERDATETO', 'To')
|
||||||
);
|
)->setLocale(Security::getCurrentUser()->Locale);
|
||||||
$filters = CMSSiteTreeFilter::get_all_filters();
|
$filters = CMSSiteTreeFilter::get_all_filters();
|
||||||
// Remove 'All pages' as we set that to empty/default value
|
// Remove 'All pages' as we set that to empty/default value
|
||||||
unset($filters[CMSSiteTreeFilter_Search::class]);
|
unset($filters[CMSSiteTreeFilter_Search::class]);
|
||||||
|
Loading…
Reference in New Issue
Block a user