<?php

class bhLDAPAuthFormSignin extends sfGuardFormSignin
{

  public function configure()
  {
    $this->setWidgets(array(
      'username' => new sfWidgetFormInput(),
      'password' => new sfWidgetFormInput(array('type' => 'password')),
      'remember' => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'username' => new sfValidatorString(),
      'password' => new sfValidatorString(),
      'remember' => new sfValidatorBoolean(),
    ));
   $this->widgetSchema['password']->setAttribute('autocomplete', 'off');
    $this->validatorSchema->setPostValidator(new bhLDAPUserValidator());

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

}
