/**
  * the constructor of a Simple/basic SearchForm
  */
 function __construct($controller, $name, $fields = null, $actions = null)
 {
     if (!$fields) {
         $fields = new FieldSet($searchBy = new CompositeField(new HeaderField(_t('ProductSearchForm.SEARCHBY', 'Search Products'), 2), new HeaderField(_t('ProductSearchForm.WHERE', 'Where?'), 3), new LocationTreeDropdown('Location', ''), $categoryFields = new CompositeField(new HeaderField(_t('ProductSearchForm.SEARCHCRITERIA', 'Search Criteria'), 3), new MyTypeDropdown("ProductCategory1", 'Category #1', 'ProductCategory', null, null, false, array('Any' => 'Any Category')), new LiteralField('or1', ' or '), new MyTypeDropdown("ProductCategory2", 'Category #2', 'ProductCategory', null, null, true, array('' => '')), new LiteralField('or2', ' or '), new MyTypeDropdown("ProductCategory3", 'Category #3', 'ProductCategory', null, null, true, array('' => ''))), new TextField("keywords", _t('ProductSearchForm.KEYWORDS', 'Keywords'))), $sortBy = new CompositeField(new HeaderField(_t('ProductSearchForm.SORTBY', 'Sort Results By'), 3), new OptionsetField("sortby", "", array('PageTitle' => _t('ProductSearchForm.NAME', 'Name'), 'Category' => _t('ProductSearchForm.CATEGORY', 'Category'), 'Location' => _t('ProductSearchForm.LOCATION', 'Location')), 'PageTitle')));
         $searchBy->ID = "ProductSearchForm_SearchBy";
         $sortBy->ID = "ProductSearchForm_SortBy";
         $categoryFields->ID = "ProductSearchForm_SearchBy_Category";
     }
     if (!$actions) {
         $actions = new FieldSet(new FormAction("results", _t('ProductSearchForm.SEARCH', 'Search')));
     }
     parent::__construct($controller, $name, $fields, $actions);
 }
 /**
  * the constructor of a Simple/basic SearchForm
  */
 function __construct($controller, $name, $fields = null, $actions = null)
 {
     if (!$fields) {
         $fields = new FieldSet($searchBy = new CompositeField(new HeaderField('SearchByHeader', _t('AdvancedSearchForm.SEARCHBY', 'SEARCH BY')), new TextField("+", _t('AdvancedSearchForm.ALLWORDS', 'All Words')), new TextField("quote", _t('AdvancedSearchForm.EXACT', 'Exact Phrase')), new TextField("any", _t('AdvancedSearchForm.ATLEAST', 'At Least One Of the Words')), new TextField("-", _t('AdvancedSearchForm.WITHOUT', 'Without the Words'))), $sortBy = new CompositeField(new HeaderField('SortByHeader', _t('AdvancedSearchForm.SORTBY', 'SORT RESULTS BY')), new OptionsetField("sortby", "", array('Relevance' => _t('AdvancedSearchForm.RELEVANCE', 'Relevance'), 'LastUpdated' => _t('AdvancedSearchForm.LASTUPDATED', 'Last Updated'), 'PageTitle' => _t('AdvancedSearchForm.PAGETITLE', 'Page Title')), 'Relevance')), $chooseDate = new CompositeField(new HeaderField('LastUpdatedHeader', _t('AdvancedSearchForm.LASTUPDATEDHEADER', 'LAST UPDATED')), new DateField("From", _t('AdvancedSearchForm.FROM', 'From')), new DateField("To", _t('AdvancedSearchForm.TO', 'To'))));
         $searchBy->ID = "AdvancedSearchForm_SearchBy";
         $searchOnly->ID = "AdvancedSearchForm_SearchOnly";
         $sortBy->ID = "AdvancedSearchForm_SortBy";
         $chooseDate->ID = "AdvancedSearchForm_ChooseDate";
     }
     if (!$actions) {
         $actions = new FieldSet(new FormAction("results", _t('AdvancedSearchForm.GO', 'Go')));
     }
     parent::__construct($controller, $name, $fields, $actions);
 }
 /**
  * the constructor of a Simple/basic SearchForm
  */
 function __construct($controller, $name, $fields = null, $actions = null)
 {
     // Need this before we call parent::_construct
     $this->controller = $controller;
     if (!$fields) {
         if ($this->controller->GeoLevelName() != 'No level' && $this->controller->getBusinessCount() != 0) {
             $searchBusinessHeading = 'Search Businesses in ' . $this->controller->Title;
         } else {
             $searchBusinessHeading = _t('BusinessSearchForm.SEARCHBUSINESSES', 'Search Our Network');
         }
         $fields = new FieldSet($searchBy = new CompositeField(new HeaderField($searchBusinessHeading, 2), new HeaderField(_t('BusinessSearchForm.BUSINESSDETAILS', 'Business Details'), 4), new NumericField("floid", _t('BusinessSearchForm.FLOID', 'FLO ID')), new TextField("keywords", _t('BusinessSearchForm.KEYWORDS', 'Name or keyword')), $this->getLocationFields(), $certFields = new CompositeField(new HeaderField(_t('BusinessSearchForm.SEARCHCRITERIA', 'Product Type / Function'), 4), new MyTypeDropdown("ProductCategory1", 'Product Type', 'ProductCategory', null, null, false, array('All' => 'All')), new MyTypeDropdown("CertificationType1", 'Function', 'CertificationType', null, null, false, array('All' => 'All')), new LiteralField('andOr1', '<span class="andOr" id="andOr1">or</span>'), new MyTypeDropdown("ProductCategory2", 'Product Type', 'ProductCategory', null, null, false, array('All' => 'All')), new MyTypeDropdown("CertificationType2", 'Function', 'CertificationType', null, null, false, array('All' => 'All')), new LiteralField('andOr2', '<span class="andOr" id="andOr2">or</span>'), new MyTypeDropdown("ProductCategory3", 'Product Type', 'ProductCategory', null, null, false, array('All' => 'All')), new MyTypeDropdown("CertificationType3", 'Function', 'CertificationType', null, null, false, array('All' => 'All')), new LiteralField('addCriteria', '<div id="addRemoveCriteria"><a href="#" id="addCriteria">Add criteria</a><span id="addRemovePipe"> | </span><a href="#" id="removeCriteria">Remove criteria</a></div>'), new OptionsetField('CertificationAndOr', '', array('AND' => 'Must match ALL of the selection below', 'OR' => 'Must match ANY of the selection below'), 'AND'))), $sortBy = new HiddenField('sortby', '', 'Location'));
         $searchBy->ID = "BusinessSearchForm_SearchBy";
         $sortBy->ID = "BusinessSearchForm_SortBy";
         $certFields->ID = "BusinessSearchForm_SearchBy_CertificationCriteria";
     }
     if (!$actions) {
         $actions = new FieldSet(new FormAction("results", _t('BusinessSearchForm.SEARCH', 'Search')));
     }
     parent::__construct($controller, $name, $fields, $actions);
 }
Пример #4
0
 public function __construct(Role $model)
 {
     parent::__construct($model);
 }
 public function __construct(ImageFileModel $model)
 {
     parent::__construct($model);
 }
Пример #6
0
 public function __construct(Group $model)
 {
     parent::__construct($model);
 }
 /**
  * This builds an EmployeesSearchForm from a classic search form.
  */
 function __construct(SearchForm $oldSearchForm)
 {
     parent::__construct($oldSearchForm->seed, $oldSearchForm->module, $oldSearchForm->action);
     $this->setup(array($oldSearchForm->module => $oldSearchForm->searchdefs), array($oldSearchForm->module => $oldSearchForm->searchFields), $oldSearchForm->tpl, $oldSearchForm->displayView, $oldSearchForm->listViewDefs);
     $this->lv = $oldSearchForm->lv;
 }
Пример #8
0
 function __construct($seed, $module, $subPanel, $options = array())
 {
     $this->subPanel = $subPanel;
     parent::__construct($seed, $module, 'DetailView', $options);
 }