<?php

/**
 * Log form base class.
 *
 * @package    form
 * @subpackage log
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseLogForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'       => new sfWidgetFormInputHidden(),
      'stamp'    => new sfWidgetFormDate(),
      'username' => new sfWidgetFormInput(),
      'accion'   => new sfWidgetFormInput(),
      'ip'       => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'       => new sfValidatorPropelChoice(array('model' => 'Log', 'column' => 'id', 'required' => false)),
      'stamp'    => new sfValidatorDate(array('required' => false)),
      'username' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'accion'   => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'ip'       => new sfValidatorString(array('max_length' => 25, 'required' => false)),
    ));

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

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

    parent::setup();
  }

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


}
