<?php

/**
 * KataoUser form base class.
 *
 * @package    form
 * @subpackage katao_user
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseKataoUserForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                => new sfWidgetFormInputHidden(),
      'katao_member_id'   => new sfWidgetFormPropelSelect(array('model' => 'KataoMember', 'add_empty' => true)),
      'katao_supplier_id' => new sfWidgetFormPropelSelect(array('model' => 'KataoSupplier', 'add_empty' => true)),
      'status'            => new sfWidgetFormInput(),
      'email'             => new sfWidgetFormInput(),
      'address1'          => new sfWidgetFormInput(),
      'address2'          => new sfWidgetFormInput(),
      'zip'               => new sfWidgetFormInput(),
      'city'              => new sfWidgetFormInput(),
      'phone'             => new sfWidgetFormInput(),
      'fax'               => new sfWidgetFormInput(),
      'gmap_lng'          => new sfWidgetFormInput(),
      'gmap_lat'          => new sfWidgetFormInput(),
      'login'             => new sfWidgetFormInput(),
      'password'          => new sfWidgetFormInput(),
      'is_seo'            => new sfWidgetFormInput(),
      'is_admin'          => new sfWidgetFormInput(),
      'created_at'        => new sfWidgetFormDateTime(),
      'updated_at'        => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                => new sfValidatorPropelChoice(array('model' => 'KataoUser', 'column' => 'id', 'required' => false)),
      'katao_member_id'   => new sfValidatorPropelChoice(array('model' => 'KataoMember', 'column' => 'id', 'required' => false)),
      'katao_supplier_id' => new sfValidatorPropelChoice(array('model' => 'KataoSupplier', 'column' => 'id', 'required' => false)),
      'status'            => new sfValidatorInteger(),
      'email'             => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'address1'          => new sfValidatorString(array('max_length' => 255)),
      'address2'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'zip'               => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'city'              => new sfValidatorString(array('max_length' => 255)),
      'phone'             => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'fax'               => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'gmap_lng'          => new sfValidatorNumber(array('required' => false)),
      'gmap_lat'          => new sfValidatorNumber(array('required' => false)),
      'login'             => new sfValidatorString(array('max_length' => 255)),
      'password'          => new sfValidatorString(array('max_length' => 255)),
      'is_seo'            => new sfValidatorInteger(array('required' => false)),
      'is_admin'          => new sfValidatorInteger(array('required' => false)),
      'created_at'        => new sfValidatorDateTime(array('required' => false)),
      'updated_at'        => new sfValidatorDateTime(array('required' => false)),
    ));

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

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

    parent::setup();
  }

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


}
