<?php

Goweb::loadClass('Goweb_Form');

/**
 * Goweb Sitemanager 5 Framework
 * @version    5.0.0
 * @category   Backoffice
 * @package    Filemanager
 * @subpackage Form
 * @author     I&D <dev@goweb.pt>, Pedro Pinto <ppinto@goweb.pt>
 * @copyright  2009 (c) Goweb (http://www.goweb.pt)
*/
class Form_Pasta extends Goweb_Form {
    
    /**
     * Metodo obrigatorio as classes herdeiras do Goweb_Form
    */
    protected function _setup() {
        $this->pasta = $this->Text(array('maxlength' => '20', 'size' => '15'));
        $this->pasta->label = translateAdmin('Nome da Pasta');
        $this->pasta->validators->Required(translateAdmin('O campo <b>{{campo}}</b> &eacute; de preenchimento obrigat&oacute;rio.', $this->pasta->label));
        /*$this->pasta->validators->Regex(translateAdmin('O campo <b>{{campo}}</b> n&atilde;o pode conter caracteres com acentos.', $this->pasta->label),
                                        array('expression' => '^[A-Za-z0-9]+$'));*/
        $this->submit = $this->Submit();
        $this->submit->value = translateAdmin('Criar');
    }
}
