My favorites
▼
|
Sign in
djtt
Repository of scripts and config files created by the djtechtools.com community
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
worldmap
/
trunk
/
apps
/
frontend
/
modules
/
viewport
/
lib
/
searchForm.class.php
r149
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* user form base class.
*
* @method user getObject() Returns the current form's model object
*
* @package worldmap
* @subpackage form
* @author Your name here
* @version SVN: $Id: sfDoctrineFormGeneratedInheritanceTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/
class searchForm extends BaseForm
{
public function setup()
{
parent::setup();
$this->widgetSchema ['text'] = new sfWidgetFormInputText();
$this->validatorSchema['text'] = new sfValidatorString(array('required' => false));
$types = array('user' => 'DJs', 'event' => 'events', 'store' => 'stores');
$this->widgetSchema ['types'] = new sfWidgetFormChoice(array('multiple' => true, 'choices' => $types));
$this->validatorSchema['types'] = new sfValidatorChoice(array('multiple' => true, 'choices' => $types, 'required' => false));
$this->widgetSchema ['controller_list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'controller'));
$this->validatorSchema['controller_list'] = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'controller', 'required' => false));
$this->widgetSchema ['manufacturer_list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'manufacturer'));
$this->validatorSchema['manufacturer_list'] = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'manufacturer', 'required' => false));
$this->widgetSchema ['startdate'] = new sfWidgetFormDate();
$this->validatorSchema['startdate'] = new sfValidatorDate(array('date_format' => 'Y-m-d', 'required' => false));
$this->widgetSchema ['enddate'] = new sfWidgetFormDate();
$this->validatorSchema['enddate'] = new sfValidatorDate(array('date_format' => 'Y-m-d', 'required' => false));
$this->widgetSchema->setNameFormat('filter[%s]');
$this->disableCSRFProtection();
}
}
Show details
Hide details
Change log
r131
by lukas.smith on Dec 24, 2009
Diff
implemented a form for the filters
Go to:
...ewport/actions/actions.class.php
...ps/frontend/modules/viewport/lib
...iewport/lib/searchForm.class.php
...wport/templates/indexSuccess.php
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 1906 bytes, 42 lines
View raw file
Powered by
Google Project Hosting