<?php
/**
 *
 * @author Eduardo Bonfandini [eduardo@solis.coop.br]
 *
 * @version $Id$
 *
 * \b Maintainers \n
 * Eduardo Bonfandini [eduardo@solis.coop.br]
 * Jamiel Spezia [jamiel@solis.coop.br]
 * Luiz Gregory Filho [luiz@solis.coop.br]
 * Moises Heberle [moises@solis.coop.br]
 *
 * @since
 * Class created on 22/10/2008
 *
 * \b Organization: \n
 * SOLIS - Cooperativa de Solucoes Livres \n
 * The Gnuteca3 Development Team
 *
 * \b CopyLeft: \n
 * CopyLeft (L) 2008 SOLIS - Cooperativa de Solucoes Livres \n
 *
 * \b License: \n
 * Licensed under GPL (for further details read the COPYING file or http://www.gnu.org/copyleft/gpl.html )
 *
 * \b History: \n
 * See history in SVN repository: http://gnuteca.solis.coop.br
 */
class FrmClassificationArea extends GnutecaForm
{
    public function __construct()
    {
        $this->setAllFunctions('ClassificationArea', null, 'classificationAreaId', 'areaName');
        parent::__construct();
        $this->setFocus('areaName');
    }


    public function createFields()
    {
        if ($this->function == 'update')
        {
            $fields[] = new MTextField('classificationAreaId', null, _M('Code', $this->module),FIELD_ID_SIZE, null, null, true);
            $valids[]   = new MRequiredValidator('classificationAreaId');
        }
        $fields[]   = new MTextField('areaName', null, _M('Area name', $this->module),FIELD_DESCRIPTION_SIZE);
        $valids[]   = new MRequiredValidator('areaName');
        $fields[]   = new MMultilineField('classification', null, _M('Classification', $this->module), FIELD_DESCRIPTION_SIZE, FIELD_MULTILINE_ROWS_SIZE, FIELD_MULTILINE_COLS_SIZE);
        $valids[]   = new MRequiredValidator('classification');
        $fields[]   = new MMultilineField('ignoreClassification', null, _M('Ignore Classification', $this->module),FIELD_DESCRIPTION_SIZE, FIELD_MULTILINE_ROWS_SIZE, FIELD_MULTILINE_COLS_SIZE);
        $this->setFields($fields);
        $this->setValidators($valids);
    }
}
?>
