public function init() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'id_perscholarity')->setDecorators(array('ViewHelper')); $mapperTypeScholarity = new Register_Model_Mapper_PerTypeScholarity(); $sections = $mapperTypeScholarity->fetchAll(); $optTypeScholarity[''] = ''; foreach ($sections as $section) { $optTypeScholarity[$section['id_pertypescholarity']] = $section['type_scholarity']; } $elements[] = $this->createElement('select', 'fk_id_pertypescholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Kursu')->addMultiOptions($optTypeScholarity)->setRequired(true); $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)->setRequired(true); $elements[] = $this->createElement('text', 'scholarity')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Kursu')->setRequired(true); $elements[] = $this->createElement('text', 'Title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Titulu'); $elements[] = $this->createElement('select', 'fk_id_perlevelscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel'); $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setRequired(true)->setLabel('Kategoria'); $elements[] = $this->createElement('text', 'external_code')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 50)->setAttrib('class', 'm-wrap span12')->setLabel('Kodigu Esterno'); $this->addElements($elements); App_Form_Toolbar::build($this, self::ID); $this->setDecorators($this->getDefaultFormDecorators()); }
/** * */ 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() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'id_drh_trainingplan')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'fk_id_addcountry')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'need_insurance')->setDecorators(array('ViewHelper'))->setValue(0); $elements[] = $this->createElement('hidden', 'expense')->setIsArray(true); $elements[] = $this->createElement('hidden', 'amount_expense')->setIsArray(true); $elements[] = $this->createElement('hidden', 'staff')->setIsArray(true); $elements[] = $this->createElement('hidden', 'handicapped')->setIsArray(true); $elements[] = $this->createElement('hidden', 'gender')->setIsArray(true); $elements[] = $this->createElement('hidden', 'unit_cost')->setIsArray(true); $elements[] = $this->createElement('hidden', 'final_cost')->setIsArray(true); $elements[] = $this->createElement('hidden', 'training_fund')->setIsArray(true); $elements[] = $this->createElement('text', 'entity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Entidade responsável ba formasaun'); $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)->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_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations); $elements[] = $this->createElement('text', 'country_timor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setValue('Timor-Leste')->setLabel('Nasaun'); $dbCountry = App_Model_DbTable_Factory::get('AddCountry'); $countries = $dbCountry->fetchAll(); $optCountry[''] = ''; foreach ($countries as $country) { if ($country['id_addcountry'] != 1) { $optCountry[$country['id_addcountry']] = $country['country']; } } $elements[] = $this->createElement('select', 'country')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->addMultiOptions($optCountry); $optModality[''] = ''; $optModality['L'] = 'Iha territóriu no ho entidade nasionál'; $optModality['A'] = 'Iha rai liur'; $optModality['T'] = 'Iha territóriu nasionál ho entidade formadora husi rai liur'; $elements[] = $this->createElement('select', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade')->addMultiOptions($optModality)->setRequired(true); $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'); $elements[] = $this->createElement('text', 'city')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Sidade'); $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('readonly', true)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('KUSTU TOTÁL BA FORMASAUN'); $elements[] = $this->createElement('text', 'amount_expenses')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->removeDecorator('Label')->setAttrib('readonly', true)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Totál'); $this->addElements($elements); App_Form_Toolbar::build($this, self::ID); $this->setDecorators($this->getDefaultFormDecorators()); }
public function init() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'id_fe_registration')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'entity')->setIsArray(true); $elements[] = $this->createElement('text', 'client_name')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Kompletu'); $elements[] = $this->createElement('text', 'client_fone')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Kontatu'); $elements[] = $this->createElement('text', 'email')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('E-mail'); $elements[] = $this->createElement('text', 'evidence')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Kartaun Evidensia'); $elements[] = $this->createElement('text', 'electoral')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Kartaun Eleitoral'); $elements[] = $this->createElement('text', 'date_inserted')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12')->setLabel('Data'); $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea(); $sections = $mapperScholarityArea->fetchAll(); $optScholarityArea[''] = ''; foreach ($sections as $section) { $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area']; } $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']; } $dbScholarityLevel = App_Model_DbTable_Factory::get('PerLevelScholarity'); $levels = $dbScholarityLevel->fetchAll(array(), array('id_perlevelscholarity')); $optLevel[''] = ''; foreach ($levels as $level) { $optLevel[$level->id_perlevelscholarity] = $level->level_scholarity; } $elementsProfessional = array(); $elementsProfessional[] = $this->createElement('select', 'area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->setBelongsTo('professional')->addMultiOptions($optScholarityArea); $elementsProfessional[] = $this->createElement('select', 'occupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->setBelongsTo('professional')->addMultiOptions($optOccupations); $elementsProfessional[] = $this->createElement('select', 'level')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optLevel)->setBelongsTo('professional')->setLabel('Nivel'); $professionalSubForm = new Zend_Form_SubForm(); $professionalSubForm->addElements($elementsProfessional); $this->addSubForm($professionalSubForm, 'professional'); $elementsFormation = array(); $elementsFormation[] = $this->createElement('select', 'area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->setBelongsTo('formation')->addMultiOptions($optScholarityArea); $elementsFormation[] = $this->createElement('select', 'occupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->setBelongsTo('formation')->addMultiOptions($optOccupations); $elementsFormation[] = $this->createElement('select', 'level')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optLevel)->setBelongsTo('formation')->setLabel('Nivel'); $formationSubForm = new Zend_Form_SubForm(); $formationSubForm->addElements($elementsFormation); $this->addSubForm($formationSubForm, 'formation'); $selectedElements = array(); $selectedElements[] = $this->createElement('select', 'area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->setBelongsTo('selected')->setRequired(true)->addMultiOptions($optScholarityArea); $selectedElements[] = $this->createElement('select', 'occupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->setBelongsTo('selected')->setRequired(true)->addMultiOptions($optOccupations); $selectedSubForm = new Zend_Form_SubForm(); $selectedSubForm->addElements($selectedElements); $this->addSubForm($selectedSubForm, 'selected'); $this->addElements($elements); App_Form_Toolbar::build($this, self::ID); $this->setDecorators($this->getDefaultFormDecorators()); }
public function init() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'fk_id_fefpenterprise')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'id_jobtraining')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('information'); $elements[] = $this->createElement('text', 'title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 100)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Titulu'); $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'); $elements[] = $this->createElement('text', 'entity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Entidade promotora'); /* $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 ) ->setRequired( true ) ->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)->setRequired(true); $elements[] = $this->createElement('text', 'total_woman')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Feto Nain Hira'); $elements[] = $this->createElement('text', 'total_man')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Mane Nain Hira'); $elements[] = $this->createElement('text', 'total_participants')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Total Partisipante'); $elements[] = $this->createElement('text', 'salary')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 20)->setRequired(true)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Subsidiu'); $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Inisiu'); $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Planu Remata'); $elements[] = $this->createElement('text', 'duration')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Durasaun - Fulan'); $optStatus[''] = ''; $optStatus['1'] = 'Loke'; $optStatus['0'] = 'Taka'; $optStatus['2'] = 'Kansela'; $elements[] = $this->createElement('select', 'status')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Status')->setValue(1)->setAttrib('readOnly', true)->addMultiOptions($optStatus); $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setAttrib('rows', 3)->setLabel('Deskrisaum Jeral'); App_Form_Toolbar::build($this, self::ID); $this->addElements($elements); }
public function init() { $this->setAttrib('class', 'horizontal-form')->setName('search'); $elements = array(); $mapperFeContract = new Fefop_Model_Mapper_FEContract(); // Combo to search clients $clients = $mapperFeContract->listBeneficiaries(); $optClients[''] = ''; foreach ($clients as $row) { $optClients[$row['id_perdata']] = Client_Model_Mapper_Client::buildNumRow($row) . ' - ' . Client_Model_Mapper_Client::buildName($row); } $elements[] = $this->createElement('select', 'fk_id_perdata')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optClients)->setLabel('Benefisiariu'); // Combo to search enterprises $enterprises = $mapperFeContract->listEnterprises(); $optEnterprises[''] = ''; foreach ($enterprises as $row) { $optEnterprises[$row['id_fefpenterprise']] = $row['enterprise_name']; } $elements[] = $this->createElement('select', 'fk_id_fefpenterprise')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optEnterprises)->setLabel('Empreza'); // Combo to search institutes $intitutes = $mapperFeContract->listInstitutes(); $optInstitutes[''] = ''; foreach ($intitutes 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('Inst. Ensinu'); $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'); $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); $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_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Okupasaun')->addMultiOptions($optOccupations); $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(); $mapperFeRegistration = new Fefop_Model_Mapper_FERegistration(); // Combo to search clients $clients = $mapperFeRegistration->listBeneficiaries(); $optClients[''] = ''; foreach ($clients as $row) { $optClients[$row['id_perdata']] = Client_Model_Mapper_Client::buildNumRow($row) . ' - ' . Client_Model_Mapper_Client::buildName($row); } $elements[] = $this->createElement('select', 'fk_id_perdata')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optClients)->setLabel('Benefisiariu'); // Combo to search enterprises $enterprises = $mapperFeRegistration->listEnterprises(); $optEnterprises[''] = ''; foreach ($enterprises as $row) { $optEnterprises[$row['id_fefpenterprise']] = $row['enterprise_name']; } $elements[] = $this->createElement('select', 'fk_id_fefpenterprise')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optEnterprises)->setLabel('Empreza'); // Combo to search institutes $intitutes = $mapperFeRegistration->listInstitutes(); $optInstitutes[''] = ''; foreach ($intitutes 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('Inst. Ensinu'); $optIdentifier = array('selected' => "Formasaun iha servisu fatin ne'ebe hakarak"); $elements[] = $this->createElement('select', 'identifier')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Formasaun')->addMultiOptions($optIdentifier); $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); $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_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations); $dbScholarityLevel = App_Model_DbTable_Factory::get('PerLevelScholarity'); $levels = $dbScholarityLevel->fetchAll(array(), array('id_perlevelscholarity')); $optLevel[''] = ''; foreach ($levels as $level) { $optLevel[$level->id_perlevelscholarity] = $level->level_scholarity; } $elements[] = $this->createElement('select', 'fk_id_perlevelscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optLevel)->setLabel('Nivel'); $this->addElements($elements); }
public function init() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'id_fe_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', 'fk_id_fefpenterprise')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'fk_id_trainee')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'fk_id_fe_registration')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'cost_expense')->setIsArray(true); $elements[] = $this->createElement('text', 'entity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Entidade promotora'); $elements[] = $this->createElement('text', 'beneficiary')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Benefisiariu'); $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)->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_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations)->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('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('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', 'date_formation' ) ->setDecorators( $this->getDefaultElementDecorators() ) ->setRequired( true ) ->setAttrib( 'class', 'm-wrap span12' ) ->setAttrib( 'readonly', true ) ->setLabel( 'Data limite formasaun' ); */ $elements[] = $this->createElement('text', 'duration_month')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Durasaun'); $this->addElements($elements); App_Form_Toolbar::build($this, self::ID); $this->setDecorators($this->getDefaultFormDecorators()); }
public function init() { $this->setAttrib('class', 'horizontal-form')->setName('search'); $elements = array(); $mapperDrhTrainingPlan = new Fefop_Model_Mapper_DRHTrainingPlan(); $institutes = $mapperDrhTrainingPlan->listIntitutes(); $optInstitute[''] = ''; foreach ($institutes as $institute) { $optInstitute[$institute['fk_id_fefpeduinstitution']] = $institute['entity']; } $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Entidade responsável ba formasaun')->addMultiOptions($optInstitute); $mapperDrhContract = new Fefop_Model_Mapper_DRHContract(); $trainingProvider = $mapperDrhContract->listTrainingProvider(); $optTrainingProvider[''] = ''; foreach ($trainingProvider as $institute) { $optTrainingProvider[$institute['responsible']] = $institute['institution']; } $elements[] = $this->createElement('select', 'training_provider')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Sentru Formasaun')->addMultiOptions($optTrainingProvider); $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); $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_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations); $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); $optModality[''] = ''; $optModality['L'] = 'Iha rai laran no ho entidade nasionál sira'; $optModality['A'] = 'Iha rai liur'; $optModality['T'] = 'Iha rai laran ho entidade formadora husi rai liur'; $elements[] = $this->createElement('select', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade')->addMultiOptions($optModality); $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->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')->setLabel('Data finalizasaun'); $elements[] = $this->createElement('text', 'beneficiary')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Benefisiariu'); $this->addElements($elements); }
public function init() { $this->setAttrib('class', 'horizontal-form')->setName('search'); $elements = array(); $elements[] = $this->createElement('hidden', 'minimum_amount')->setValue(1000)->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'maximum_amount')->setValue(200000)->setDecorators(array('ViewHelper')); $mapperDrhTrainingPlan = new Fefop_Model_Mapper_DRHTrainingPlan(); $institutes = $mapperDrhTrainingPlan->listIntitutes(); $optInstitute[''] = ''; foreach ($institutes as $institute) { $optInstitute[$institute['fk_id_fefpeduinstitution']] = $institute['entity']; } $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Entidade responsável ba formasaun')->addMultiOptions($optInstitute); $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); $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_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations); $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); $optModality[''] = ''; $optModality['L'] = 'Em território e entidades nacionais'; $optModality['A'] = 'No estrangeiro'; $optModality['T'] = 'Em território nacional com entidade formadora estrangeira'; $elements[] = $this->createElement('select', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade')->addMultiOptions($optModality); $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->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')->setLabel('Data finalizasaun'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $this->removeElement('fk_id_dec'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('register/course-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Rejistu Kursu')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $mapperTypeScholarity = new Register_Model_Mapper_PerTypeScholarity(); $sections = $mapperTypeScholarity->fetchAll(); $optTypeScholarity[''] = ''; foreach ($sections as $section) { $optTypeScholarity[$section['id_pertypescholarity']] = $section['type_scholarity']; } $elements[] = $this->createElement('select', 'fk_id_pertypescholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Kursu')->addMultiOptions($optTypeScholarity); $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); $dbLevelScholarity = App_Model_DbTable_Factory::get('PerLevelScholarity'); $rows = $dbLevelScholarity->fetchAll(array(), array('id_perlevelscholarity')); $optLevelScholarity[''] = ''; foreach ($rows as $row) { $optLevelScholarity[$row['id_perlevelscholarity']] = $row['level_scholarity']; } $elements[] = $this->createElement('select', 'fk_id_perlevelscholarity')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optLevelScholarity)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel'); $optCategory[''] = ''; $optCategory['S'] = 'Eskola'; $optCategory['U'] = 'Superior'; $optCategory['V'] = 'Formasaun Teknika Profisional'; $optCategory['C'] = 'Formasaun Comunitaria'; $optCategory['N'] = 'Formasaun Profisional'; $elements[] = $this->createElement('select', 'category_school')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optCategory)->setRegisterInArrayValidator(false)->setLabel('Kategoria'); $this->addElements($elements); }