From e33576d23e3dbfdbe5e7a0add534a05bdcd3b1ca Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 1 May 2011 12:34:16 +1200 Subject: [PATCH] MINOR Grouping date search fields in CMSMain->SearchForm --- code/controller/CMSMain.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/controller/CMSMain.php b/code/controller/CMSMain.php index 9b5e6459..208049a4 100755 --- a/code/controller/CMSMain.php +++ b/code/controller/CMSMain.php @@ -172,8 +172,10 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $fields = new FieldSet( new TextField('Term', _t('CMSSearch.FILTERLABELTEXT', 'Content')), - $dateFrom = new DateField('LastEditedFrom', _t('CMSSearch.FilterDateFrom', 'from')), - $dateTo = new DateField('LastEditedTo', _t('CMSSearch.FilterDateFrom', 'to')), + $dateGroup = new FieldGroup( + $dateFrom = new DateField('LastEditedFrom', _t('CMSSearch.FilterDateFrom', 'from')), + $dateTo = new DateField('LastEditedTo', _t('CMSSearch.FilterDateFrom', 'to')) + ), new DropdownField( 'FilterClass', _t('CMSMain.SearchTreeFormPagesDropdown', 'Pages'), @@ -189,6 +191,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr ) // new TextField('MetaTags', _t('CMSMain.SearchMetaTags', 'Meta tags')) ); + $dateGroup->subfieldParam = 'FieldHolder'; $dateFrom->setConfig('showcalendar', true); $dateTo->setConfig('showcalendar', true);