Permalink
Browse files

MINOR Grouping date search fields in CMSMain->SearchForm

  • Loading branch information...
1 parent 4f157e3 commit e33576d23e3dbfdbe5e7a0add534a05bdcd3b1ca @chillu chillu committed May 1, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 code/controller/CMSMain.php
@@ -172,8 +172,10 @@ function SearchForm() {
$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 @@ function SearchForm() {
)
// new TextField('MetaTags', _t('CMSMain.SearchMetaTags', 'Meta tags'))
);
+ $dateGroup->subfieldParam = 'FieldHolder';
$dateFrom->setConfig('showcalendar', true);
$dateTo->setConfig('showcalendar', true);

0 comments on commit e33576d

Please sign in to comment.