<?php

/**
 * KataoMemberDeposit form base class.
 *
 * @package    form
 * @subpackage katao_member_deposit
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseKataoMemberDepositForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),
      'katao_member_id' => new sfWidgetFormPropelSelect(array('model' => 'KataoMember', 'add_empty' => false)),
      'amount'          => new sfWidgetFormInput(),
      'comment'         => new sfWidgetFormTextarea(),
      'currency'        => new sfWidgetFormInput(),
      'payment_mode'    => new sfWidgetFormInput(),
      'check_number'    => new sfWidgetFormInput(),
      'check_bank'      => new sfWidgetFormInput(),
      'check_deposit'   => new sfWidgetFormInput(),
      'status'          => new sfWidgetFormInput(),
      'valued_at'       => new sfWidgetFormDateTime(),
      'valid_until'     => new sfWidgetFormDateTime(),
      'created_at'      => new sfWidgetFormDateTime(),
      'updated_at'      => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'              => new sfValidatorPropelChoice(array('model' => 'KataoMemberDeposit', 'column' => 'id', 'required' => false)),
      'katao_member_id' => new sfValidatorPropelChoice(array('model' => 'KataoMember', 'column' => 'id')),
      'amount'          => new sfValidatorNumber(),
      'comment'         => new sfValidatorString(array('required' => false)),
      'currency'        => new sfValidatorInteger(),
      'payment_mode'    => new sfValidatorInteger(array('required' => false)),
      'check_number'    => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'check_bank'      => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'check_deposit'   => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'status'          => new sfValidatorInteger(),
      'valued_at'       => new sfValidatorDateTime(array('required' => false)),
      'valid_until'     => new sfValidatorDateTime(array('required' => false)),
      'created_at'      => new sfValidatorDateTime(array('required' => false)),
      'updated_at'      => new sfValidatorDateTime(array('required' => false)),
    ));

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

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

    parent::setup();
  }

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


}
