public function __construct(&$vars)
{
parent::__construct($vars, _("Search For Time"));
if ($GLOBALS['registry']->isAdmin(array('permission' => 'hermes:review'))) {
$type = Hermes::getEmployeesType();
$this->addVariable(_("Employees"), 'employees', $type[0], false, false, null, array($type[1]));
}
$type = $this->getClientsType();
$cli = $this->addVariable(_("Clients"), 'clients', $type[0], false, false, null, $type[1]);
$cli->setAction(Horde_Form_Action::factory('submit'));
$cli->setOption('trackchange', true);
$type = $this->getJobTypesType();
$this->addVariable(_("Job Types"), 'jobtypes', $type[0], false, false, null, $type[1]);
$this->addVariable(_("Cost Objects"), 'costobjects', 'multienum', false, false, null, array(Hermes::getCostObjectType($vars->get('clients'))));
$this->addVariable(_("Do not include entries before"), 'start', 'monthdayyear', false, false, null, array(date('Y') - 10));
$this->addVariable(_("Do not include entries after"), 'end', 'monthdayyear', false, false, null, array(date('Y') - 10));
$states = array('' => '', '1' => _("Yes"), '0' => _("No"));
$this->addVariable(_("Submitted?"), 'submitted', 'enum', false, false, null, array($states));
$this->addVariable(_("Exported?"), 'exported', 'enum', false, false, null, array($states));
$this->addVariable(_("Billable?"), 'billable', 'enum', false, false, null, array($states));
$this->setButtons(_("Search"));
}