~agasti-rhok-02/sahana-agasti/mayon-rhok-02

« back to all changes in this revision

Viewing changes to lib/filter/doctrine/base/BaseagScenarioStaffResourceFormFilter.class.php

  • Committer: Chad Heuschober
  • Date: 2010-12-04 04:01:41 UTC
  • mfrom: (1.2.1 mayon)
  • Revision ID: chad.heuschober@mail.cuny.edu-20101204040141-orjw950gt411jzmt
Merged changes from r2 of project trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    $this->setWidgets(array(
16
16
      'scenario_id'       => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('agScenario'), 'add_empty' => true)),
17
17
      'staff_resource_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('agStaffResource'), 'add_empty' => true)),
 
18
      'deployment_weight' => new sfWidgetFormFilterInput(),
18
19
      'created_at'        => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
19
20
      'updated_at'        => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
20
21
    ));
22
23
    $this->setValidators(array(
23
24
      'scenario_id'       => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('agScenario'), 'column' => 'id')),
24
25
      'staff_resource_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('agStaffResource'), 'column' => 'id')),
 
26
      'deployment_weight' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
25
27
      'created_at'        => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
26
28
      'updated_at'        => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
27
29
    ));
46
48
      'id'                => 'Number',
47
49
      'scenario_id'       => 'ForeignKey',
48
50
      'staff_resource_id' => 'ForeignKey',
 
51
      'deployment_weight' => 'Number',
49
52
      'created_at'        => 'Date',
50
53
      'updated_at'        => 'Date',
51
54
    );