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); }
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); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setValue('student-class/school-report')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setValue('Relatoriu: Graduadu liu husi Nivel Eskola')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $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'); $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea(); $sections = $mapperScholarityArea->fetchAll(); $optScholarityArea[''] = ''; foreach ($sections as $section) { $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area']; } $elements[] = $this->createElement('select', 'fk_id_scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->addMultiOptions($optScholarityArea); $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); }
/** * */ 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); }
/** * */ public function searchCourseAction() { $category = $this->_getParam('category'); $filters = array('type' => Register_Model_Mapper_PerTypeScholarity::NON_FORMAL, 'category' => $category); $mapperScholarity = new Register_Model_Mapper_PerScholarity(); $optScholarity = $mapperScholarity->getOptionsScholarity($filters); $opts = array(); foreach ($optScholarity as $id => $value) { $opts[] = array('id' => $id, 'name' => $value); } $this->_helper->json($opts); }
/** * */ public function init() { $elements = array(); $elements[] = $this->createElement('hidden', 'fk_id_jobvacancy')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear'); $elements[] = $this->createElement('hidden', 'clients')->setIsArray(true)->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'source')->setValue('M')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear'); $elements[] = $this->createElement('hidden', 'minimum_age')->setValue(20)->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'maximum_age')->setValue(40)->setDecorators(array('ViewHelper')); // List Districts just from Timor $mapperDistrict = new Register_Model_Mapper_AddDistrict(); $districts = $mapperDistrict->listAll(1); $optDistrict[''] = ''; foreach ($districts as $district) { $optDistrict[$district->id_adddistrict] = $district->District; } $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optDistrict)->setLabel('Distritu')->setRegisterInArrayValidator(false); $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu'); $mapperScholarity = new Register_Model_Mapper_PerScholarity(); $optCategory = $mapperScholarity->getOptionsCategory(Register_Model_Mapper_PerTypeScholarity::FORMAL); $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optCategory)->setLabel('Kategoria'); $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kurso')->setRegisterInArrayValidator(false); $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('multiselect', 'fk_id_perlanguage')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Lian Fuan')->addMultiOptions($optLanguage); $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); $elements[] = $this->createElement('text', 'minimum_experience')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span8 text-numeric4')->setAttrib('style', 'background: #fff;')->setLabel('Esperiensia Minima (Anos)'); $optGender[''] = 'MANE NO FETO'; $optGender['M'] = 'MANE'; $optGender['F'] = 'FETO'; $elements[] = $this->createElement('select', 'gender')->setDecorators($this->getDefaultElementDecorators())->setLabel('Seksu')->addMultiOptions($optGender); $optDrive['1'] = 'Presiza'; $optDrive['0'] = 'La Presiza'; $elements[] = $this->createElement('radio', 'drive_licence')->setDecorators($this->getDefaultElementDecorators())->setLabel('Karta Kondusaun')->addMultiOptions($optDrive)->setAttrib('label_class', 'radio')->setSeparator('')->setValue(0); $filters = array('type' => Register_Model_Mapper_PerTypeScholarity::NON_FORMAL); $optProfessional = $mapperScholarity->getOptionsScholarity($filters); $elements[] = $this->createElement('multiselect', 'fk_id_training')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Formasaun Profisional')->addMultiOptions($optProfessional); $this->addElements($elements); }
/** * */ public function searchCourseAction() { $mapperScholarity = new Register_Model_Mapper_PerScholarity(); $optScholarity = $mapperScholarity->getOptionsScholarity($this->_getAllParams()); $opts = array(); foreach ($optScholarity as $id => $value) { $opts[] = array('id' => $id, 'name' => $value); } $this->_helper->json($opts); }
/** * */ public function searchScholarityAction() { $filters = array('category' => $this->_getParam('category'), 'type' => $this->_getParam('type')); $mapperScholarity = new Register_Model_Mapper_PerScholarity(); $optScholarity = $mapperScholarity->getOptionsScholarity($filters); $opts = array(array('id' => '', 'name' => '')); foreach ($optScholarity as $id => $value) { $opts[] = array('id' => $id, 'name' => $value); } $this->_helper->json($opts); }
/** * */ public function addDetailedFormationAction() { if ($this->getRequest()->isXmlHttpRequest()) { $this->_helper->layout()->disableLayout(); } $this->view->expense = $this->_getParam('expense'); $defaultValues = array('beneficiaries' => null, 'fk_id_perscholarity' => null, 'level' => null, 'quantity' => null, 'amount_unit' => 0, 'amount_total' => 0, 'comments' => ''); $row = $this->_getParam('row'); if (!empty($row)) { $defaultValues = $row->toArray(); $this->view->expense = $row->fk_id_budget_category; } $mapperScholarity = new Register_Model_Mapper_PerScholarity(); $this->view->scholarityOptions = $mapperScholarity->getOptionsScholarity(); $this->view->defaultValues = $defaultValues; }