<?php

/**
 * Destinos form base class.
 *
 * @package    form
 * @subpackage destinos
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseDestinosForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'codmun'      => new sfWidgetFormInputHidden(),
      'id_comision' => new sfWidgetFormInputHidden(),
      'orden'       => new sfWidgetFormInput(),
      'estado'      => new sfWidgetFormInput(),
      'observacion' => new sfWidgetFormInput(),
      'vigencia'    => new sfWidgetFormInputHidden(),
      'coddepto'    => new sfWidgetFormPropelSelect(array('model' => 'Departamentos', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'codmun'      => new sfValidatorPropelChoice(array('model' => 'Destinos', 'column' => 'codmun', 'required' => false)),
      'id_comision' => new sfValidatorPropelChoice(array('model' => 'Comisiones', 'column' => 'vigencia', 'required' => false)),
      'orden'       => new sfValidatorNumber(array('required' => false)),
      'estado'      => new sfValidatorNumber(array('required' => false)),
      'observacion' => new sfValidatorString(array('max_length' => 600, 'required' => false)),
      'vigencia'    => new sfValidatorPropelChoice(array('model' => 'Comisiones', 'column' => 'vigencia', 'required' => false)),
      'coddepto'    => new sfValidatorPropelChoice(array('model' => 'Departamentos', 'column' => 'coddepto', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('destinos[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Destinos';
  }


}
