Esempio n. 1
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_ri_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'cost_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'item_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'quantity')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'amount_unit')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'amount_total')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'comments')->setIsArray(true);
     $elements[] = $this->createElement('text', 'institute')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Sentru Formasaun');
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->addMultiOptions($optCountry)->setLabel('Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu')->setRequired(true);
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setRequired(true)->setLabel('Loron Remata');
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->removeDecorator('Label')->setAttrib('class', 'm-wrap span12 money-mask required')->setLabel('Total')->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
Esempio n. 2
0
 /**
  *
  * @return Zend_Db_Table_Rowset
  */
 public function listAll()
 {
     $dbOcupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $dbOcupation = App_Model_DbTable_Factory::get('PROFOcupation');
     $select = $dbOcupationTimor->select()->setIntegrityCheck(false)->from(array('ot' => $dbOcupationTimor))->join(array('oi' => $dbOcupation), 'ot.fk_id_profocupation = oi.id_profocupation', array('ocupation_acronym' => 'acronym', 'ocupation_name'))->order(array('ocupation_name', 'ocupation_name_timor'));
     return $dbOcupation->fetchAll($select);
 }
Esempio n. 3
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_addaddress')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('address');
     $dbCountry = App_Model_DbTable_Factory::get('AddCountry');
     $countries = $dbCountry->fetchAll();
     $optCountry[''] = '';
     foreach ($countries as $country) {
         $optCountry[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->addMultiOptions($optCountry)->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsucu')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Suku')->setRequired(true);
     $elements[] = $this->createElement('text', 'street')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Dalan');
     $elements[] = $this->createElement('text', 'number')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 50)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Numeru');
     $elements[] = $this->createElement('text', 'postal_code')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 50)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Kodiu Postal');
     $elements[] = $this->createElement('text', 'village')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Vila');
     $elements[] = $this->createElement('textarea', 'complement')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 3)->setLabel('Komplementu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Esempio n. 4
0
 /**
  *
  * @param int $ceop
  * @return Zend_Db_Table_Row
  */
 public function searchUserCeop($ceop)
 {
     $dbUserBusinessPlan = App_Model_DbTable_Factory::get('UserBusinessPlan');
     $dbUser = App_Model_DbTable_Factory::get('SysUser');
     $select = $dbUser->select()->from(array('u' => $dbUser))->setIntegrityCheck(false)->join(array('ub' => $dbUserBusinessPlan), 'ub.fk_id_sysuser = u.id_sysuser', array())->where('ub.fk_id_dec = ?', $ceop);
     return $dbUser->fetchRow($select);
 }
Esempio n. 5
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_drh_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_drh_trainingplan')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_drh_beneficiary')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'expense')->setIsArray(true);
     $elements[] = $this->createElement('text', 'num_training_plan')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Plano ba Formasaun');
     $elements[] = $this->createElement('text', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade');
     $elements[] = $this->createElement('text', 'scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Área');
     $elements[] = $this->createElement('text', 'ocupation_name_timor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Dezignasaun');
     $elements[] = $this->createElement('text', 'country')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Nasaun');
     $elements[] = $this->createElement('text', 'city')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Sidade');
     $elements[] = $this->createElement('text', 'entity')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Sentru Formasaun');
     $elements[] = $this->createElement('text', 'training_provider')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Entidade responsável ba formasaun');
     $elements[] = $this->createElement('text', 'beneficiary')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Benefisiáriu ikus');
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data hahú');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setRequired(true)->setLabel('Data finalizasaun');
     $elements[] = $this->createElement('text', 'duration_days')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Durasaun');
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optCountry)->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->setLabel('Distritu')->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
Esempio n. 6
0
 /**
  * @access public
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->getElement('path')->setValue(self::PATH);
     $this->getElement('title')->setValue(self::TITLE);
     $this->removeElement('date_start');
     $this->removeElement('date_finish');
     $this->removeElement('id_adddistrict');
     $this->removeElement('fk_id_dec');
     $elements = array();
     //Tipo FEFOPFund
     $optTypeFEFOPFund = array();
     array_unshift($optTypeFEFOPFund, '');
     $optTypeFEFOPFund['D'] = 'Donor';
     $optTypeFEFOPFund['G'] = 'Governo';
     $elements[] = $this->createElement('select', 'type_fefopfund')->setLabel('Tipu de Fundu')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optTypeFEFOPFund);
     //Tipo Despesa
     $rows = App_Model_DbTable_Factory::get('BudgetCategoryType')->fetchAll();
     $optBudgetCategoryType = array();
     array_unshift($optBudgetCategoryType, '');
     foreach ($rows as $row) {
         $optBudgetCategoryType[$row->id_budget_category_type] = $row->description;
     }
     $elements[] = $this->createElement('select', 'id_budget_category_type')->setLabel('Komponente')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optBudgetCategoryType);
     //Ano
     $year = date('Y');
     $interval = 10;
     $keys = $values = range($year - $interval, $year + $interval);
     $optYear = array('' => '');
     $optYear += array_combine($keys, $values);
     $elements[] = $this->createElement('select', 'year_start')->setLabel('Tinan')->setRequired(true)->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optYear);
     $elements[] = $this->createElement('select', 'year_finish')->setLabel('To\'o')->setRequired(true)->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optYear);
     $this->addElements($elements);
 }
Esempio n. 7
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_campaign')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_department')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('text', 'campaign_title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Kampanha')->setRequired(true);
     $mapperConfig = new Admin_Model_Mapper_SmsConfig();
     $config = $mapperConfig->getConfig();
     $maxLength = $config->max_length - (strlen($config->sms_prefix) + strlen($config->sms_sufix) + 16);
     $elements[] = $this->createElement('textarea', 'content')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->setAttrib('class', 'm-wrap span12')->setAttrib('rows', 3)->setAttrib('maxlength', $maxLength)->setLabel('Mensajem')->setRequired(true);
     $elements[] = $this->createElement('text', 'date_scheduled')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data atu haruka');
     $dbCampaignType = App_Model_DbTable_Factory::get('CampaignType');
     $rows = $dbCampaignType->fetchAll(array(), array('campaign_type'));
     $optCampaignType[''] = '';
     foreach ($rows as $row) {
         $optCampaignType[$row->id_campaign_type] = $row->campaign_type;
     }
     $elements[] = $this->createElement('select', 'fk_id_campaign_type')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Kampanha')->addMultiOptions($optCampaignType)->setRequired(true)->setAttrib('class', 'm-wrap span12 chosen');
     $mapperGroup = new Sms_Model_Mapper_Group();
     $rows = $mapperGroup->listGroupWithTotals();
     $optGroups = array();
     foreach ($rows as $row) {
         $optGroups[$row['id_sms_group']] = $row['sms_group_name'] . ' (' . $row['total'] . ')';
     }
     $elements[] = $this->createElement('multiCheckbox', 'group')->setDecorators(array('ViewHelper'))->addMultiOptions($optGroups)->setAttrib('onchange', 'Sms.Campaign.calcTotalSending( this );')->setAttrib('class', 'group-sending')->setRequired(true)->setSeparator('');
     $optWaitResponse['0'] = 'Lae';
     $optWaitResponse['1'] = 'Loos';
     $elements[] = $this->createElement('select', 'wait_response')->setDecorators($this->getDefaultElementDecorators())->setLabel('Hein Resposta')->addMultiOptions($optWaitResponse)->setValue('0')->setRequired(true)->setAttrib('class', 'm-wrap span12');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
Esempio n. 8
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('knowledge');
     $dbTypeLanguage = App_Model_DbTable_Factory::get('PerTypeKnowledge');
     $typesKnowledge = $dbTypeLanguage->fetchAll(array(), array('type_knowledge'));
     $optTypeKnowledges[''] = '';
     foreach ($typesKnowledge as $typeKnowledge) {
         $optTypeKnowledges[$typeKnowledge['id_pertypeknowledge']] = $typeKnowledge['type_knowledge'];
     }
     $elements[] = $this->createElement('select', 'fk_id_pertypeknowlegde')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Konesimentu')->setRequired(true)->addMultiOptions($optTypeKnowledges);
     $dbKnowledge = App_Model_DbTable_Factory::get('PerKnowledge');
     $knowledges = $dbKnowledge->fetchAll(array(), array('name_knowledge'));
     $optKnowledge[''] = '';
     foreach ($knowledges as $knowledge) {
         $optKnowledge[$knowledge['id_perknowledge']] = $knowledge['name_knowledge'];
     }
     $elements[] = $this->createElement('select', 'fk_id_perknowledge')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Koñesimentu')->setRequired(true)->addMultiOptions($optKnowledge);
     $dbLevelKnowledge = App_Model_DbTable_Factory::get('PerLevelKnowledge');
     $levels = $dbLevelKnowledge->fetchAll(array(), array('name_level'));
     $optLevel[''] = '';
     foreach ($levels as $level) {
         $optLevel[$level['id_levelknowledge']] = $level['name_level'] . ' - ' . $level['description'];
     }
     $elements[] = $this->createElement('select', 'fk_id_levelknowledge')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel Koñesimentu')->setRequired(true)->addMultiOptions($optLevel);
     $elements[] = $this->createElement('textarea', 'comment')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 4)->setLabel('Komentariu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Esempio n. 9
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'minimum_amount')->setValue(0)->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'maximum_amount')->setValue(100000)->setDecorators(array('ViewHelper'));
     $mapperPceFase = new Fefop_Model_Mapper_PCEContract();
     $studentClasses = $mapperPceFase->listStudentClassContract();
     $optStudentClass[''] = '';
     foreach ($studentClasses as $class) {
         $optStudentClass[$class['id_fefpstudentclass']] = $class['class_name'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpstudentclass')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optStudentClass)->setLabel('Formasaun Profisional');
     $elements[] = $this->createElement('text', 'beneficiary')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Benefisiariu');
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optCountry)->setLabel('Distritu');
     $mapperIsicDivision = new Register_Model_Mapper_IsicDivision();
     $rows = $mapperIsicDivision->listAll();
     $optDivisionTimor[''] = '';
     foreach ($rows as $row) {
         $optDivisionTimor[$row->id_isicdivision] = $row->name_disivion;
     }
     $elements[] = $this->createElement('select', 'fk_id_isicdivision')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Setor de Atividade')->addMultiOptions($optDivisionTimor);
     $elements[] = $this->createElement('select', 'fk_id_isicclasstimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Atividade de Negócio');
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Remata');
     $this->addElements($elements);
 }
Esempio n. 10
0
 /**
  *
  * @param array $filters
  * @return Zend_Db_Table_Rowset
  */
 public function listByFilters($filters = array())
 {
     $dbAudit = App_Model_DbTable_Factory::get('SysAudit');
     $dbForm = App_Model_DbTable_Factory::get('SysForm');
     $dbModule = App_Model_DbTable_Factory::get('SysModule');
     $dbUser = App_Model_DbTable_Factory::get('SysUser');
     $select = $dbAudit->select()->from(array('a' => $dbAudit))->setIntegrityCheck(false)->join(array('f' => $dbForm), 'f.id_sysform = a.fk_id_sysform', array('form', 'date_audit' => new Zend_Db_Expr('DATE_FORMAT( a.date_time, "%d/%m/%Y" )')))->join(array('m' => $dbModule), 'm.id_sysmodule = a.fk_id_sysmodule', array('module'))->join(array('u' => $dbUser), 'u.id_sysuser = a.fk_id_sysuser', array('name'))->order(array('date_time DESC'));
     $date = new Zend_Date();
     if (!empty($filters['start_date']) && Zend_Date::isDate($filters['start_date'])) {
         $select->where('DATE( a.date_time ) >= ?', $date->set($filters['start_date'])->toString('yyyy-MM-dd'));
     }
     if (!empty($filters['finish_date']) && Zend_Date::isDate($filters['finish_date'])) {
         $select->where('DATE( a.date_time ) <= ?', $date->set($filters['finish_date'])->toString('yyyy-MM-dd'));
     }
     if (!empty($filters['fk_id_sysuser'])) {
         $select->where('a.fk_id_sysuser = ?', $filters['fk_id_sysuser']);
     }
     if (!empty($filters['fk_id_sysmodule'])) {
         $select->where('a.fk_id_sysmodule = ?', $filters['fk_id_sysmodule']);
     }
     if (!empty($filters['fk_id_sysform'])) {
         $select->where('a.fk_id_sysform = ?', $filters['fk_id_sysform']);
     }
     if (!empty($filters['description'])) {
         $select->where('a.description LIKE ?', '%' . $filters['description'] . '%');
     }
     return $dbAudit->fetchAll($select);
 }
Esempio n. 11
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_jobvacancy')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_relationship')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('language');
     $dbLanguage = App_Model_DbTable_Factory::get('PerLanguage');
     $languages = $dbLanguage->fetchAll(array(), array('language'));
     $optLanguage[''] = '';
     foreach ($languages as $language) {
         $optLanguage[$language['id_perlanguage']] = $language['language'];
     }
     $elements[] = $this->createElement('select', 'fk_id_perlanguage')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Lian Fuan')->setRequired(true)->addMultiOptions($optLanguage);
     $dbLevelKnowledge = App_Model_DbTable_Factory::get('PerLevelKnowledge');
     $levels = $dbLevelKnowledge->fetchAll(array(), array('name_level'));
     $optLevel[''] = '';
     foreach ($levels as $level) {
         $optLevel[$level['id_levelknowledge']] = $level['name_level'] . ' - ' . $level['description'];
     }
     $elements[] = $this->createElement('select', 'fk_id_levelknowledge')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel Koñesimentu')->setRequired(true)->addMultiOptions($optLevel);
     $optUsage[''] = '';
     $optUsage['KUALIA'] = 'KUALIA';
     $optUsage['HATENE'] = 'HATENE';
     $optUsage['HAKEREK'] = 'HAKEREK';
     $optUsage['LE'] = 'HATENE LE';
     $elements[] = $this->createElement('select', 'usage')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Utilizasaun')->setRequired(true)->addMultiOptions($optUsage);
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Esempio n. 12
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_sysform')->setDecorators(array('ViewHelper'));
     $dbModule = App_Model_DbTable_Factory::get('SysModule');
     $modules = $dbModule->fetchAll(array(), array('module'));
     $optModule[''] = '';
     foreach ($modules as $module) {
         $optModule[$module['id_sysmodule']] = $module['module'];
     }
     $elements[] = $this->createElement('select', 'fk_id_sysmodule')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 focused')->setLabel('Modulu')->addMultiOptions($optModule)->setRequired(true);
     $elements[] = $this->createElement('text', 'form')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Formulário')->setRequired(true);
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12 focused')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Deskrisaun');
     $dbOperations = App_Model_DbTable_Factory::get('SysOperations');
     $operations = $dbOperations->fetchAll();
     $optOperations = array();
     foreach ($operations as $operation) {
         $optOperations[$operation->id_sysoperation] = $operation->operation;
     }
     $elements[] = $this->createElement('multiCheckbox', 'operations')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optOperations)->setAttrib('class', 'm-wrap span12')->setSeparator('')->setLabel('Operações');
     $optRadio['1'] = 'Sim';
     $optRadio['0'] = 'Lai';
     $elements[] = $this->createElement('radio', 'active')->setDecorators($this->getDefaultElementDecorators())->setLabel('Ativu')->addMultiOptions($optRadio)->setAttrib('label_class', 'radio')->setSeparator('')->setValue(1)->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
 }
Esempio n. 13
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('text', 'campaign_title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Kampanha');
     $dbCampaignType = App_Model_DbTable_Factory::get('CampaignType');
     $rows = $dbCampaignType->fetchAll(array(), array('campaign_type'));
     $optCampaignType[''] = '';
     foreach ($rows as $row) {
         $optCampaignType[$row->id_campaign_type] = $row->campaign_type;
     }
     $elements[] = $this->createElement('select', 'fk_id_campaign_type')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Kampanha')->addMultiOptions($optCampaignType)->setAttrib('class', 'm-wrap span12 chosen');
     $mapperDepartment = new Admin_Model_Mapper_Department();
     $rows = $mapperDepartment->fetchAll();
     $optDepartment[''] = '';
     foreach ($rows as $row) {
         $optDepartment[$row->id_department] = $row->name;
     }
     $elements[] = $this->createElement('select', 'fk_id_department')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Departamentu')->addMultiOptions($optDepartment);
     $mapperGroup = new Sms_Model_Mapper_Group();
     $rows = $mapperGroup->fetchAll();
     $optGroups = array();
     foreach ($rows as $row) {
         $optGroups[$row['id_sms_group']] = $row['sms_group_name'];
     }
     $elements[] = $this->createElement('multiCheckbox', 'group')->setDecorators(array('ViewHelper'))->addMultiOptions($optGroups)->setAttrib('class', 'group-sending')->setRequired(true)->setSeparator('');
     $view = $this->getView();
     $optStatuses = $view->campaign()->getStatuses();
     array_unshift($optStatuses, '');
     $elements[] = $this->createElement('select', 'status')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optStatuses)->setLabel('Status')->setAttrib('class', 'm-wrap span12');
     $this->addElements($elements);
 }
Esempio n. 14
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_action_plan_group')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('caseGroup');
     $dbUser = App_Model_DbTable_Factory::get('SysUser');
     $rows = $dbUser->fetchAll(array('fk_id_dec = ?' => Zend_Auth::getInstance()->getIdentity()->fk_id_dec), array('name'));
     $users[''] = '';
     foreach ($rows as $row) {
         $users[$row->id_sysuser] = $row->name . ' (' . $row->login . ')';
     }
     $elements[] = $this->createElement('select', 'fk_id_counselor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Konselleru')->addMultiOptions($users);
     $mapperEducationInsitute = new Register_Model_Mapper_EducationInstitute();
     $rows = $mapperEducationInsitute->listByFilters();
     $optEducationInstitute[''] = '';
     foreach ($rows as $row) {
         $optEducationInstitute[$row->id_fefpeduinstitution] = $row->institution;
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setLabel('Instituisaun Ensinu')->addMultiOptions($optEducationInstitute)->setAttrib('onchange', 'Client.CaseGroup.setRequiredGroup( this.value, "E" )')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen');
     $dbCountry = App_Model_DbTable_Factory::get('AddCountry');
     $countries = $dbCountry->fetchAll();
     $optCountry[''] = '';
     foreach ($countries as $country) {
         $optCountry[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setAttrib('onchange', 'Client.CaseGroup.setRequiredGroup( this.value, "C" )')->setLabel('Nasaun')->addMultiOptions($optCountry)->setRequired(true);
     $elements[] = $this->createElement('text', 'name')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 50)->addFilter('StringTrim')->addFilter('StringToUpper')->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Naran');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Esempio n. 15
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('text', 'class_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Klase');
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('CEOP')->addMultiOptions($optCeop)->setRequired(true)->setAttrib('class', 'm-wrap span12');
     $mapperEducationInsitute = new Register_Model_Mapper_EducationInstitute();
     $rows = $mapperEducationInsitute->listByFilters();
     $optEducationInstitute[''] = '';
     foreach ($rows as $row) {
         $optEducationInstitute[$row->id_fefpeduinstitution] = $row->institution;
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setLabel('Instituisaun Ensinu')->addMultiOptions($optEducationInstitute)->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen');
     $optTransport['1'] = 'Loke';
     $optTransport['0'] = 'Taka';
     $optTransport['2'] = 'Kansela';
     $elements[] = $this->createElement('select', 'active')->setDecorators($this->getDefaultElementDecorators())->setLabel('Status')->addMultiOptions($optTransport)->setValue(1)->setRequired(true);
     $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'schedule_finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Planu Remata');
     $filters = array('type' => Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $optScholarity = $mapperScholarity->getOptionsScholarity($filters);
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setRegisterInArrayValidator(false)->addMultiOptions($optScholarity)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu');
     $this->addElements($elements);
 }
Esempio n. 16
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_fp_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_annual_planning')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_perscholarity')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_planning_course')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_unit_cost')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpstudentclass')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_budget_category')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'cost_client')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'client_handicapped')->setIsArray(true);
     $elements[] = $this->createElement('text', 'institute')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12')->setLabel('Sentru ba formasaun ne\'ebé akreditadu')->setRequired(true);
     $elements[] = $this->createElement('text', 'class_name')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12')->setLabel('Turma')->setRequired(true);
     $elements[] = $this->createElement('text', 'scholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12')->setLabel('Kursu')->setRequired(true);
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span6 money-mask')->setLabel('Total')->setRequired(true);
     $elements[] = $this->createElement('text', 'unit_cost')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span6 money-mask')->setLabel('Kustu Unitariu')->setRequired(true);
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optCountry)->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->setLabel('Distritu')->setRequired(true);
     $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 date')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date')->setAttrib('readOnly', true)->setRequired(true)->setLabel('Loron Remata');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
Esempio n. 17
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_sysuser')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('text', 'title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Titulu')->setRequired(true);
     $optLevel[''] = '';
     $optLevel[0] = 'Urgente';
     $optLevel[1] = 'Normal';
     $elements[] = $this->createElement('select', 'level')->setDecorators($this->getDefaultElementDecorators())->setLabel('Nivel')->setAttrib('class', 'm-wrap span12')->setRequired(true)->addMultiOptions($optLevel);
     $elements[] = $this->createElement('text', 'date_scheduled')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data Ajenda');
     $dbSysUser = App_Model_DbTable_Factory::get('SysUser');
     $users = $dbSysUser->fetchAll(array('active = ?' => 1), array('name'));
     $optUsers[''] = '';
     foreach ($users as $user) {
         $optUsers[$user['id_sysuser']] = $user['name'];
     }
     $elements[] = $this->createElement('multiselect', 'users')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Uzuariu')->addMultiOptions($optUsers);
     $dbUserGroup = App_Model_DbTable_Factory::get('UserGroup');
     $groups = $dbUserGroup->fetchAll(array(), array('name'));
     $optGroups[''] = '';
     foreach ($groups as $group) {
         $optGroups[$group['id_usergroup']] = $group['name'];
     }
     $elements[] = $this->createElement('multiselect', 'groups')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Grupu')->addMultiOptions($optGroups);
     $elements[] = $this->createElement('checkbox', 'status')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(1)->setAttrib('class', 'toggle-check')->setLabel('Ativu?');
     $elements[] = $this->createElement('textarea', 'message')->setDecorators($this->getDefaultElementDecorators())->setAttrib('rows', 3)->setRequired(true)->setAttrib('class', 'm-wrap ckeditor  span12');
     $this->addElements($elements);
 }
Esempio n. 18
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'minimum_amount')->setValue(0)->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'maximum_amount')->setValue(100000)->setDecorators(array('ViewHelper'));
     $mapperInstitute = new Register_Model_Mapper_EducationInstitute();
     $rows = $mapperInstitute->listByFilters();
     $optInstitutes[''] = '';
     foreach ($rows as $row) {
         $optInstitutes[$row['id_fefpeduinstitution']] = $row['institution'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optInstitutes)->setLabel('Sentru Formasaun');
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optCountry)->setLabel('Distritu');
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu');
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Remata');
     $this->addElements($elements);
 }
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('text', 'institution')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Instituisaun Ensinu');
     $mapperDistrict = new Register_Model_Mapper_AddDistrict();
     $rows = $mapperDistrict->listAll();
     $optDistrict[''] = '';
     foreach ($rows as $row) {
         $optDistrict[$row->id_adddistrict] = $row->District;
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Distritu')->addMultiOptions($optDistrict);
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('CEOP')->addMultiOptions($optCeop)->setAttrib('class', 'm-wrap span12');
     $dbTypeInstitution = App_Model_DbTable_Factory::get('TypeInstitution');
     $rows = $dbTypeInstitution->fetchAll(array(), array('type_institution'));
     $optType[''] = '';
     foreach ($rows as $row) {
         $optType[$row->id_typeinstitution] = $row->type_institution;
     }
     $elements[] = $this->createElement('select', 'fk_typeinstitution')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Instituisaun')->addMultiOptions($optType)->setAttrib('class', 'm-wrap span12');
     $optRegister[''] = '';
     $optRegister['1'] = 'Sim';
     $optRegister['0'] = 'Lae';
     $elements[] = $this->createElement('select', 'register')->setDecorators($this->getDefaultElementDecorators())->setLabel('Rejistu ?')->addMultiOptions($optRegister)->setAttrib('class', 'm-wrap span6');
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $optScholarity = $mapperScholarity->getOptionsScholarity();
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setRegisterInArrayValidator(false)->addMultiOptions($optScholarity)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu');
     $this->addElements($elements);
 }
Esempio n. 20
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_appointment')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'objective')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_action_plan')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear');
     $dbUser = App_Model_DbTable_Factory::get('SysUser');
     $rows = $dbUser->fetchAll(array('fk_id_dec = ?' => Zend_Auth::getInstance()->getIdentity()->fk_id_dec), array('name'));
     $users[''] = '';
     foreach ($rows as $row) {
         $users[$row->id_sysuser] = $row->name . ' (' . $row->login . ')';
     }
     $elements[] = $this->createElement('select', 'fk_id_counselor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Ho Jestor Kazu')->addMultiOptions($users);
     $elements[] = $this->createElement('select', 'fk_id_sysuser')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Ema neebe halo')->addMultiOptions($users);
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('Distritu')->addMultiOptions($optCeop)->setRequired(true)->setAttrib('class', 'm-wrap span12');
     $elements[] = $this->createElement('text', 'date_appointment')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data ba audiensia');
     $elements[] = $this->createElement('text', 'time_appointment')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 time-mask')->setLabel('Oras');
     $elements[] = $this->createElement('textarea', 'appointment_desc')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setRequired(true)->setAttrib('rows', 2)->setAttrib('class', 'm-wrap span12')->setLabel('Deskrisaun');
     $elements[] = $this->createElement('checkbox', 'appointment_filled')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(0)->setAttrib('class', 'toggle-check')->setLabel('Kliente mai?');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Esempio n. 21
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Data Iniciu');
     $elements[] = $this->createElement('text', 'finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Data Fim');
     $mapperSysUser = new Admin_Model_Mapper_SysUser();
     $users = $mapperSysUser->listAll();
     $optUsers[''] = '';
     foreach ($users as $user) {
         $optUsers[$user['id_sysuser']] = $user['name'];
     }
     $elements[] = $this->createElement('select', 'fk_id_sysuser')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Usuariu')->addMultiOptions($optUsers)->setRequired(true);
     $elements[] = $this->createElement('text', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Deskrisaun');
     $dbModule = App_Model_DbTable_Factory::get('SysModule');
     $modules = $dbModule->fetchAll(array(), array('module'));
     $optModule[''] = '';
     foreach ($modules as $module) {
         $optModule[$module['id_sysmodule']] = $module['module'];
     }
     $elements[] = $this->createElement('select', 'fk_id_sysmodule')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Modulu')->addMultiOptions($optModule);
     $elements[] = $this->createElement('select', 'fk_id_sysform')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Formulariu');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
 }
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $dbFefopPrograms = App_Model_DbTable_Factory::get('FEFOPPrograms');
     $programs = $dbFefopPrograms->fetchAll();
     $optPrograms[''] = '';
     foreach ($programs as $program) {
         $optPrograms[$program['id_fefop_programs']] = $program['acronym'] . ' - ' . $program['description'];
     }
     $elements[] = $this->createElement('select', 'id_fefop_programs')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Programa FEFOP')->addMultiOptions($optPrograms);
     $elements[] = $this->createElement('select', 'fk_id_fefop_modules')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Modulu FEFOP')->setRegisterInArrayValidator(false);
     $elements[] = $this->createElement('text', 'date_registration_ini')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data Rejistu Inisiu');
     $elements[] = $this->createElement('text', 'date_registration_fim')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data Rejistu Final');
     $elements[] = $this->createElement('text', 'beneficiary_name')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Naran Benefisiraiu');
     $optStatus[''] = '';
     $optStatus['1'] = 'Loos';
     $optStatus['0'] = 'Lae';
     $elements[] = $this->createElement('select', 'status')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Ativu?')->addMultiOptions($optStatus);
     $mapperSysUser = new Admin_Model_Mapper_SysUser();
     $users = $mapperSysUser->listAll();
     $optUsers[''] = '';
     foreach ($users as $user) {
         $optUsers[$user['id_sysuser']] = $user['name'];
     }
     $elements[] = $this->createElement('select', 'fk_id_user_inserted')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Usuariu Rejistu')->addMultiOptions($optUsers);
     $elements[] = $this->createElement('select', 'fk_id_user_removed')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Usuariu Libera')->addMultiOptions($optUsers);
     $optTypeBeneficiary[''] = '';
     $optTypeBeneficiary['fk_id_perdata'] = 'Kliente';
     $optTypeBeneficiary['fk_id_staff'] = 'Empreza Staff';
     $optTypeBeneficiary['fk_id_fefpeduinstitution'] = 'Inst. Ensinu';
     $optTypeBeneficiary['fk_id_fefpenterprise'] = 'Empreza';
     $elements[] = $this->createElement('select', 'type_beneficiary')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Benefisiariu')->addMultiOptions($optTypeBeneficiary);
     $this->addElements($elements);
 }
Esempio n. 23
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'minimum_amount')->setValue(0)->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'maximum_amount')->setValue(100000)->setDecorators(array('ViewHelper'));
     $mapperEnterprise = new Register_Model_Mapper_Enterprise();
     $rows = $mapperEnterprise->listByFilters();
     $optEnteprises[''] = '';
     foreach ($rows as $row) {
         $optEnteprises[$row['id_fefpenterprise']] = $row['enterprise_name'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpenterprise')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optEnteprises)->setLabel('Instituisaun responsavel ba implementasaun');
     $elements[] = $this->createElement('select', 'fk_id_per_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setLabel('Area projetu nian');
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->addMultiOptions($optCountry)->setLabel('Distritu');
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu');
     $elements[] = $this->createElement('select', 'fk_id_addsucu')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setRegisterInArrayValidator(false)->setLabel('Suku');
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Remata');
     $elements[] = $this->createElement('select', 'fk_id_per_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setLabel('Area projetu nian');
     $this->addElements($elements);
 }
Esempio n. 24
0
 /**
  * 
  */
 public function init()
 {
     parent::init();
     $this->removeElement('date_start');
     $this->removeElement('date_finish');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('register/institution-report')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Rejistu Inst. Ensinu')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $mapperDistrict = new Register_Model_Mapper_AddDistrict();
     $rows = $mapperDistrict->listAll();
     $optDistrict[''] = '';
     foreach ($rows as $row) {
         $optDistrict[$row->id_adddistrict] = $row->District;
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Distritu')->addMultiOptions($optDistrict);
     $dbTypeInstitution = App_Model_DbTable_Factory::get('TypeInstitution');
     $rows = $dbTypeInstitution->fetchAll(array(), array('type_institution'));
     $optType[''] = '';
     foreach ($rows as $row) {
         $optType[$row->id_typeinstitution] = $row->type_institution;
     }
     $elements[] = $this->createElement('select', 'fk_typeinstitution')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Instituisaun')->addMultiOptions($optType)->setAttrib('class', 'm-wrap span12');
     $optRegister[''] = '';
     $optRegister['1'] = 'Sim';
     $optRegister['0'] = 'Lae';
     $elements[] = $this->createElement('select', 'register')->setDecorators($this->getDefaultElementDecorators())->setLabel('Rejistu ?')->addMultiOptions($optRegister)->setAttrib('class', 'm-wrap span6');
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $optScholarity = $mapperScholarity->getOptionsScholarity();
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setRegisterInArrayValidator(false)->addMultiOptions($optScholarity)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu');
     $this->addElements($elements);
 }
Esempio n. 25
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $elements[] = $this->createElement('text', 'vacancy_titule')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Titulu Vaga');
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('CEOP')->addMultiOptions($optCeop)->setAttrib('class', 'm-wrap span12');
     $elements[] = $this->createElement('text', 'open_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span8')->setLabel('Data Loke');
     $elements[] = $this->createElement('text', 'close_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span8')->setLabel('Data Taka');
     $optTransport['1'] = 'Loke';
     $optTransport['0'] = 'Taka';
     $optTransport['2'] = 'Kansela';
     $elements[] = $this->createElement('select', 'active')->setDecorators($this->getDefaultElementDecorators())->setLabel('Status')->addMultiOptions($optTransport)->setValue(1)->setRequired(true);
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['acronym'] . ' ' . $occupation['ocupation_name_timor'];
     }
     $elements[] = $this->createElement('select', 'fk_id_profocupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Okupasaun')->addMultiOptions($optOccupations);
     $mapperEnterprise = new Register_Model_Mapper_Enterprise();
     $rows = $mapperEnterprise->listByFilters();
     $optEnterprise[''] = '';
     foreach ($rows as $row) {
         $optEnterprise[$row->id_fefpenterprise] = $row->enterprise_name;
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpenterprise')->setDecorators($this->getDefaultElementDecorators())->setLabel('Empreza')->addMultiOptions($optEnterprise)->setAttrib('class', 'm-wrap span12 chosen');
     $this->addElements($elements);
 }
Esempio n. 26
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('form_information');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_businessplan')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'partisipants')->setDecorators(array('ViewHelper'))->setValue('S');
     $elements[] = $this->createElement('hidden', 'clients')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'module')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setDecorators(array('ViewHelper'));
     $mapperIsicDivision = new Register_Model_Mapper_IsicDivision();
     $rows = $mapperIsicDivision->listAll();
     $optDivisionTimor[''] = '';
     foreach ($rows as $row) {
         $optDivisionTimor[$row->id_isicdivision] = $row->name_disivion;
     }
     $elements[] = $this->createElement('select', 'fk_id_isicdivision')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setAttrib('onchange', 'Pce.searchIsicClass(this)')->setLabel('Setor de Atividade')->addMultiOptions($optDivisionTimor)->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_isicclasstimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Atividade de Negócio')->setRegisterInArrayValidator(false)->setRequired(true);
     $elements[] = $this->createElement('text', 'total_partisipants')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('disabled', true)->setLabel('Total de membros')->setAttrib('class', 'm-wrap span2')->setValue(1);
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optCountry)->setLabel('Distritu')->setRequired(true);
     $this->addElements($elements);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
Esempio n. 27
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_fefpenterprise')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_staff')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('staff');
     $elements[] = $this->createElement('text', 'staff_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 250)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Funcionariu');
     $elements[] = $this->createElement('text', 'birth_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span8 date-mask date')->setLabel('Data Moris');
     $optGender[''] = '';
     $optGender['M'] = 'MANE';
     $optGender['F'] = 'FETO';
     $elements[] = $this->createElement('select', 'gender')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span8')->setLabel('Seksu')->addMultiOptions($optGender);
     $optPost[''] = '';
     $optPost['Formandu'] = 'Formandu';
     $optPost['Trabalhador'] = 'Traballador';
     $optPost['Assistente'] = 'Assistente';
     $optPost['Chefe'] = 'Xefe';
     $optPost['Diretor'] = 'Diretor';
     $elements[] = $this->createElement('select', 'post')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Kargo')->setRequired(true)->addMultiOptions($optPost);
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['ocupation_name_timor'];
     }
     $elements[] = $this->createElement('select', 'position')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Okupasaun')->addMultiOptions($optOccupations)->setRequired(true);
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Deskrisaun Funcionariu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Esempio n. 28
0
 /**
  * @access public
  * @return void
  */
 public function init()
 {
     parent::init();
     $elements = array();
     $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue(self::PATH)->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue(self::TITLE)->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $this->removeElement('fk_id_dec');
     $dbTypeTransaction = App_Model_DbTable_Factory::get('FEFOPTypeTransaction');
     $rows = $dbTypeTransaction->fetchAll();
     $optTypeTransaction = array();
     foreach ($rows as $row) {
         $optTypeTransaction[$row['id_fefop_type_transaction']] = $row['acronym'] . ' - ' . $row['description'];
     }
     $elements[] = $this->createElement('multiselect', 'fk_id_fefop_type_transaction')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optTypeTransaction)->setLabel('Tipu Transasaun');
     $mapperFund = new Fefop_Model_Mapper_Fund();
     $funds = $mapperFund->fetchAll();
     $optFunds = array();
     foreach ($funds as $fund) {
         $optFunds[$fund['id_fefopfund']] = $fund['name_fund'];
     }
     $elements[] = $this->createElement('multiselect', 'fk_id_fefopfund')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optFunds)->setLabel('Fundu');
     $optStatus = array();
     $optStatus['C'] = 'Consolidado';
     $optStatus['P'] = 'Pendente';
     $optStatus['A'] = 'Parcial';
     $elements[] = $this->createElement('multiselect', 'status')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optStatus)->setLabel('Status');
     $optPayment[''] = 'Hotu-hotu';
     $optPayment['C'] = 'Kontratu';
     $optPayment['F'] = 'Fundu';
     $elements[] = $this->createElement('select', 'bank_payment')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optPayment)->setLabel('Pagamentu');
     $this->addElements($elements);
 }
Esempio n. 29
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_per_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_modules')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpenterprise')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'item_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'employment_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'formation_expense')->setIsArray(true);
     $elements[] = $this->createElement('text', 'enterprise')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'span12 focused')->setLabel('Instituisaun responsavel ba implementasaun');
     $elements[] = $this->createElement('select', 'fk_id_per_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12 chosen')->setLabel('Area projetu nian')->setRequired(true);
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->addMultiOptions($optCountry)->setLabel('Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsucu')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'span12')->setRegisterInArrayValidator(false)->setLabel('Suku')->setRequired(true);
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'span12 date-mask')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'span12 date-mask')->setRequired(true)->setLabel('Loron Remata');
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 3)->setLabel('Deskrisaun Projetu nian');
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->removeDecorator('Label')->setAttrib('class', 'span12 money-mask required')->setLabel('Total')->setRequired(true);
     $this->addElements($elements);
 }
Esempio n. 30
0
 /**
  * 
  */
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('formstatement');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_fefop_bank_statements')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'status')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_fefop_bank_contract')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'total_contract')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'total_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_budget_category')->setIsArray(true);
     $elements[] = $this->createElement('text', 'date_statement')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setValue(Zend_Date::now()->toString('dd/MM/yyyy'))->setLabel('Data');
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setValue(0)->setAttrib('class', 'm-wrap span12 money-mask bold text-right')->setAttrib('style', 'font-size: 19px')->setLabel('Total');
     $dbTypeTransaction = App_Model_DbTable_Factory::get('FEFOPTypeTransaction');
     $rows = $dbTypeTransaction->fetchAll();
     $optTypeTransaction = array('' => '');
     foreach ($rows as $row) {
         $optTypeTransaction[$row['id_fefop_type_transaction']] = $row['acronym'] . ' - ' . $row['description'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefop_type_transaction')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optTypeTransaction)->setRequired(true)->setLabel('Tipu Transasaun');
     $optOperation[Fefop_Model_Mapper_BankStatement::DEBIT] = 'Saída';
     $optOperation[Fefop_Model_Mapper_BankStatement::CREDIT] = 'Entrada';
     $elements[] = $this->createElement('select', 'operation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optOperation)->setRequired(true)->setLabel('Operasaun');
     $mapperFund = new Fefop_Model_Mapper_Fund();
     $funds = $mapperFund->fetchAll();
     $optFunds[''] = '';
     foreach ($funds as $fund) {
         $optFunds[$fund['id_fefopfund']] = $fund['name_fund'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefopfund')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optFunds)->setLabel('Fundu');
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setAttrib('rows', '2')->setRequired(true)->setLabel('Deskrisaun');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }