Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Grouping date search fields in CMSMain->SearchForm

  • Loading branch information...
commit e33576d23e3dbfdbe5e7a0add534a05bdcd3b1ca 1 parent 4f157e3
@chillu chillu authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 code/controller/CMSMain.php
View
7 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);
Please sign in to comment.
Something went wrong with that request. Please try again.