<?php
/**
 * Schedule task search form
 *
 * @author Jader Fiegenbaum [jader@solis.coop.br]
 *
 * @version $Id$
 *
 * \b Maintainers \n
 * Jader Fiegenbaum [jader@solis.coop.br]
 * Jamiel Spezia [jamiel@solis.coop.br]
 *
 * @since
 * Class created on 01/07/2010
 *
 * \b Organization: \n
 * SOLIS - Cooperativa de Solucoes Livres \n
 * The Gnuteca3 Development Team
 *
 * \b CopyLeft: \n
 * CopyLeft (L) 2010 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 FrmScheduleTaskSearch extends GnutecaForm
{
	private $busTask;
    public function __construct()
    {
    	$this->setAllFunctions('ScheduleTask', array('scheduleTaskId'));
    	parent::__construct();
    }

    
    public function createFields()
    {
    	$fields[] = new MTextField('scheduleTaskIdS', $this->scheduleTaskIdS->value, _M('Schedule task',$this->module), FIELD_ID_SIZE);
        $this->busTask = $this->MIOLO->getBusiness($this->module, 'BusTask');
        $fields[] = new GnutecaSelection('taskIdS', '', _M('Task',$this->module), $this->busTask->listTask());
        $fields[] = new GnutecaSelection('scheduleCycleIdS', '', _M('Schedule cicle',$this->module), $this->business->listScheduleCycles());
        $fields[] = new MTextField('descriptionS', '', _M('Description', $this->module), FIELD_DESCRIPTION_SIZE);
        $fields[] = new MTextField('cycleValueS', '', _M('Value', $this->module), FIELD_DESCRIPTION_SIZE);
        
        $lbl = new MLabel(_M('Is enabled', $this->module) . ':');
        $lbl->setWidth(FIELD_LABEL_SIZE);
        $isEnableS = new MRadioButtonGroup('enableS', null, GnutecaUtils::listYesNo(1), null, null, MRadioButtonGroup::LAYOUT_HORIZONTAL);
        $fields[] = new MHContainer('hctIsEnableS', array($lbl, $isEnableS));
        
        $fields[] = new MTextField('parametersS', '', _M('Parameters', $this->module), FIELD_DESCRIPTION_SIZE);
        
        $this->setFields($fields);
    }
}
?>
