<?php
/**
 *
 * Class Request change exemplary status access Form Search
 *
 * @author Sandro Roberto Weisheimer [sandrow@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]
 * Sandro Roberto Weisheimer [sandrow@solis.coop.br]
 *
 * @since
 * Class created on 24/04/2009
 *
 * \b Organization: \n
 * SOLIS - Cooperativa de Solucoes Livres \n
 * The Gnuteca3 Development Team
 *
 * \b CopyLeft: \n
 * CopyLeft (L) 2007 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 FrmRequestChangeExemplaryStatusAccessSearch extends GnutecaForm
{
    public $busExemplaryStatus;
    public $busRequestChangeExemplaryStatusAccess;
    public $busBond;

    public function __construct()
    {
        $MIOLO  = MIOLO::getInstance();
        $module = MIOLO::getCurrentModule();
        $this->busRequestChangeExemplaryStatusAccess = $MIOLO->getBusiness($module, 'BusUserGroup');
        $this->busBond = $MIOLO->getBusiness($module, 'BusBond');
        $this->busExemplaryStatus = $MIOLO->getBusiness($module, 'BusExemplaryStatus');
        $this->setAllFunctions('RequestChangeExemplaryStatusAccess', array('basLinkId'));
        parent::__construct();
        if ( $this->primeiroAcessoAoForm() && strlen(MIOLO::_REQUEST('event')) == 0 )
        {
            $this->setFocus('exemplaryStatusIdS');
        }
    }

    public function createFields()
    {
        $fields[] = new GnutecaSelection('basLinkIdS', $this->basLinkIdS->value, _M('User group code', $this->module), $this->busBond->listBond());
        $fields[] = new GnutecaSelection('exemplaryStatusIdS', $this->exemplaryStatusIdS->value, _M('Exemplary status', $this->module), $this->busExemplaryStatus->listExemplaryStatus());

        $this->setFields( $fields );
    }
}
?>
