<?php

Goweb::loadClass('Goweb_Form');

/**
 * Goweb Sitemanager 5 Framework
 * @version    5.0.0
 * @category   Backoffice
 * @package    Index
 * @subpackage Form
 * @author     I&D <dev@goweb.pt>, Pedro Pinto <ppinto@goweb.pt>
 * @copyright  2009 (c) Goweb (http://www.goweb.pt)
*/
class Form_Search extends Goweb_Form {
    
    /**
     * Formulario de pesquisa generica
    */
    protected function _setup() {
        $this->search = $this->Text();
        $this->search->size = 40;
        $this->search->label = translateAdmin('Pesquisa');
        $this->submit = $this->Button();
		$this->submit->setAttrib('escape', false);
		$this->submit->setAttrib('type', 'submit');
        $this->submit->label = '<span>' . translateAdmin('Pesquisar') . '</span>' ;
        $this->submit->class = 'submitBtn';
        $this->submit->extra = 'onclick="return testLength(\'search\',\'2\',\'' . translateAdmin('&Eacute; necess&aacute;rio pelo menos 2 caracteres para a pesquisa!') . '\');"';
    }
}
