<?php

/**
 * KataoMemberAdhesion form base class.
 *
 * @package    form
 * @subpackage katao_member_adhesion
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseKataoMemberAdhesionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'katao_user_id' => new sfWidgetFormPropelSelect(array('model' => 'KataoUser', 'add_empty' => false)),
      'year'          => new sfWidgetFormDate(),
      'amount'        => new sfWidgetFormInput(),
      'type'          => new sfWidgetFormInput(),
      'payment_kind'  => new sfWidgetFormInput(),
      'check_no'      => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorPropelChoice(array('model' => 'KataoMemberAdhesion', 'column' => 'id', 'required' => false)),
      'katao_user_id' => new sfValidatorPropelChoice(array('model' => 'KataoUser', 'column' => 'id')),
      'year'          => new sfValidatorDate(),
      'amount'        => new sfValidatorNumber(),
      'type'          => new sfValidatorInteger(array('required' => false)),
      'payment_kind'  => new sfValidatorInteger(),
      'check_no'      => new sfValidatorString(array('max_length' => 255, 'required' => false)),
    ));

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

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

    parent::setup();
  }

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


}
