<?php
goweb::loadClass('Zend_Form_Element_Captcha');
/**
 * Goweb Sitemanager 5 Framework
 *
 * @version    5.1.3
 * @category   Goweb
 * @package    Goweb_Form
 * @subpackage Element
 * @author     I&D <dev@goweb.pt>, Pedro Pinto <ppinto@goweb.pt>
 * @copyright  2010 (c) Goweb (http://www.goweb.pt)
 */

/**
 * Generic captcha element
 *
 * @version    5.1.3
 * @category   Goweb
 * @package    Goweb_Form
 * @subpackage Element
 * @author     I&D <dev@goweb.pt>, Pedro Pinto <ppinto@goweb.pt>
 * @copyright  2010 (c) Goweb (http://www.goweb.pt)
 */
class Goweb_Form_Element_Captcha extends Zend_Form_Element_Captcha {
    
    /**
     * Constructor
     *
     * @param  string|array|Zend_Config $spec
     * @return void
     */
    public function __construct($spec, $options = null) {
        unset($this->helper);
        parent::__construct($spec, $options);
        foreach($this->getValidators() as $validator){
            $validator->setMessage(translate('O valor do Captcha est&aacute; errado'), 'badCaptcha');
            $validator->setMessage(translate('O valor do Captcha est&aacute; errado'), 'missingID');
            $validator->setMessage(translate('O valor do Captcha est&aacute; errado'), 'missingValue');
        }
    }
}