<?php

class BaseSignupForm extends BaseForm
{
    /**
     * @see sfForm
     */
    public function setup()
    {
        $this->setWidgets(array(
            'name' => new sfWidgetFormInputText(),
            'username' => new sfWidgetFormInputText(),
            'password' => new sfWidgetFormInputPassword(array('type' => 'password')),
            'remember' => new sfWidgetFormInputCheckbox(),
        ));

        $this->setValidators(array(
            'name' => new sfValidatorString(),
            'username' => new sfValidatorString(),
            'password' => new sfValidatorString(),
            'remember' => new sfValidatorBoolean(),
        ));

        $this->validatorSchema->setPostValidator(new doAuthValidatorUser());

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