public function init() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'id_isic_subsector')->setDecorators(array('ViewHelper')); $mapperSector = new Register_Model_Mapper_IsicTimor(); $sectors = $mapperSector->fetchAll(); $optSector[''] = ''; foreach ($sectors as $sector) { $optSector[$sector['id_isicclasstimor']] = $sector['acronym'] . ' - ' . $sector['name_classtimor']; } $elements[] = $this->createElement('select', 'fk_id_isicclasstimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Sektor')->addMultiOptions($optSector)->setRequired(true); $elements[] = $this->createElement('text', 'name_subsector')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Subsektor')->setRequired(true); $elements[] = $this->createElement('text', 'code')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 1)->setAttrib('class', 'm-wrap span4')->setLabel('Sigla')->setRequired(true); $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_fefpenterprise')->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', 'enterprise_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Empreza'); $elements[] = $this->createElement('text', 'num_workers')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span8 text-numeric')->setLabel('Numeru Traballador Serbisu'); $elements[] = $this->createElement('text', 'men_workers')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span8 text-numeric')->setLabel('Traballador sira Mane nain Hira'); $elements[] = $this->createElement('text', 'women_workers')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span8 text-numeric')->setLabel('Traballador sira Feto nain Hira'); $elements[] = $this->createElement('text', 'num_handicapped')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span8 text-numeric')->setLabel('Traballador sira Defisiante nain Hira'); $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 chosen'); $dbTypeEnterprise = App_Model_DbTable_Factory::get('FEFPTypeEnterprise'); $rows = $dbTypeEnterprise->fetchAll(array(), array('type_enterprise')); $optType[''] = ''; foreach ($rows as $row) { $optType[$row->id_fefptypeenterprise] = $row->type_enterprise; } $elements[] = $this->createElement('select', 'fk_fefptypeenterprite')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Empreza')->addMultiOptions($optType)->setRequired(true)->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_nationality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasionalidade')->addMultiOptions($optCountry)->setRequired(true); $mapperClassTimor = new Register_Model_Mapper_IsicTimor(); $rows = $mapperClassTimor->listAll(); $optClassTimor[''] = ''; foreach ($rows as $row) { $optClassTimor[$row->id_isicclasstimor] = $row->name_classtimor; } $elements[] = $this->createElement('select', 'fk_id_sectorindustry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Setor da Industria')->addMultiOptions($optClassTimor)->setRequired(true); $elements[] = $this->createElement('textarea', 'descrition')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Deskrisaun'); $elements[] = $this->createElement('textarea', 'condition_handicapped')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Tipu defisiencia'); App_Form_Toolbar::build($this, self::ID); $this->addElements($elements); }
public function init() { $this->setAttrib('class', 'horizontal-form')->setName('search'); $elements = array(); $elements[] = $this->createElement('text', 'enterprise_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Empreza'); $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 chosen')->setLabel('Distritu')->addMultiOptions($optDistrict); $dbTypeEnterprise = App_Model_DbTable_Factory::get('FEFPTypeEnterprise'); $rows = $dbTypeEnterprise->fetchAll(array(), array('type_enterprise')); $optTypeEnterprise[''] = ''; foreach ($rows as $row) { $optTypeEnterprise[$row->id_fefptypeenterprise] = $row->type_enterprise; } $elements[] = $this->createElement('select', 'fk_fefptypeenterprite')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Empreza')->addMultiOptions($optTypeEnterprise); $mapperClassTimor = new Register_Model_Mapper_IsicTimor(); $rows = $mapperClassTimor->listAll(); $optClassTimor[''] = ''; foreach ($rows as $row) { $optClassTimor[$row->id_isicclasstimor] = $row->name_classtimor; } $elements[] = $this->createElement('select', 'fk_id_sectorindustry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Setor da Industria')->addMultiOptions($optClassTimor); $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_nationality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasionalidade')->addMultiOptions($optCountry); $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'); $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/enterprise-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Rejistu Empreza')->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 chosen')->setLabel('Distritu')->addMultiOptions($optDistrict); $dbTypeEnterprise = App_Model_DbTable_Factory::get('FEFPTypeEnterprise'); $rows = $dbTypeEnterprise->fetchAll(array(), array('type_enterprise')); $optTypeEnterprise[''] = ''; foreach ($rows as $row) { $optTypeEnterprise[$row->id_fefptypeenterprise] = $row->type_enterprise; } $elements[] = $this->createElement('select', 'fk_fefptypeenterprite')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Empreza')->addMultiOptions($optTypeEnterprise); $mapperClassTimor = new Register_Model_Mapper_IsicTimor(); $rows = $mapperClassTimor->listAll(); $optClassTimor[''] = ''; foreach ($rows as $row) { $optClassTimor[$row->id_isicclasstimor] = $row->name_classtimor; } $elements[] = $this->createElement('select', 'fk_id_sectorindustry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Setor da Industria')->addMultiOptions($optClassTimor); $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('Nasionalidade')->addMultiOptions($optCountry); $this->addElements($elements); }
/** * */ public function searchIsicClassAction() { $this->_helper->layout()->disableLayout(); $division = $this->_getParam('id'); $mapperIsicTimor = new Register_Model_Mapper_IsicTimor(); $classTimor = $mapperIsicTimor->listClassByDisivion($division); $classes = array(); if (!empty($classTimor[$division]['classes'])) { $classes = $classTimor[$division]['classes']; } $opt = array(array('id' => '', 'name' => '')); foreach ($classes as $class) { $opt[] = array('id' => $class->id_isicclasstimor, 'name' => $class->name_classtimor); } $this->_helper->json($opt); }
public function init() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'id_fefpstudentclass')->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', 'class_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Klase'); $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Kursu'); $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)->setRequired(true)->setAttrib('class', 'm-wrap span12 chosen'); $dbTypeProposal = App_Model_DbTable_Factory::get('FEFPTypeProposal'); $typesProposal = $dbTypeProposal->fetchAll(array(), array('type_proposal')); $optTypeProposal[''] = ''; foreach ($typesProposal as $typeProposal) { $optTypeProposal[$typeProposal->id_fefptypeproposal] = $typeProposal->type_proposal; } $elements[] = $this->createElement('select', 'fk_id_fefpproposal')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Formasaun')->addMultiOptions($optTypeProposal)->setAttrib('disabled', true)->setAttrib('class', 'm-wrap span12 chosen'); $elements[] = $this->createElement('text', 'minimal_age')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Tinan Minimo'); $elements[] = $this->createElement('text', 'maximal_age')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Tinan Masimu'); $mapperPerScholarity = new Register_Model_Mapper_PerScholarity(); $rows = $mapperPerScholarity->listAll(array('type' => Register_Model_Mapper_PerTypeScholarity::FORMAL)); $optScholarity = array('' => ''); foreach ($rows as $scholarity) { $optScholarity[$scholarity->id_perscholarity] = $scholarity->scholarity; } $elements[] = $this->createElement('select', 'fk_minimal_scholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optScholarity)->setLabel('Eskolaridade Minima'); $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->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')->setRequired(true)->setLabel('Loron Planu Remata'); $elements[] = $this->createElement('text', 'real_finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Real Remata'); $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', 'formation_time')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Durasaun Formasaun'); $elements[] = $this->createElement('text', 'formation_time_class')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Oras Formasaun Klase'); $elements[] = $this->createElement('text', 'formation_time_outclass')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Durasaun Formasaun iha liu'); $mapperClassTimor = new Register_Model_Mapper_IsicTimor(); $rows = $mapperClassTimor->listAll(); $optClassTimor[''] = ''; foreach ($rows as $row) { $optClassTimor[$row->id_isicclasstimor] = $row->name_classtimor; } $elements[] = $this->createElement('select', 'fk_id_sectorindustry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Setor da Industria')->addMultiOptions($optClassTimor); $elements[] = $this->createElement('text', 'time_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 time-picker')->setLabel('Oras Inisiu'); $elements[] = $this->createElement('text', 'time_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 time-picker')->setLabel('Oras Remata'); $elements[] = $this->createElement('checkbox', 'accommodation')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(0)->setAttrib('class', 'toggle-check')->setLabel('Iha Akomodasaun?'); $elements[] = $this->createElement('checkbox', 'transport')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(0)->setAttrib('class', 'toggle-check')->setLabel('Iha Transporte?'); $elements[] = $this->createElement('checkbox', 'snack')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(0)->setAttrib('class', 'toggle-check')->setLabel('Iha Matabisu?'); $elements[] = $this->createElement('checkbox', 'lunch')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(0)->setAttrib('class', 'toggle-check')->setLabel('Iha Hahan Meiu-dia?'); $elements[] = $this->createElement('checkbox', 'dinner')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(0)->setAttrib('class', 'toggle-check')->setLabel('Iha Hahan Kalan?'); $elements[] = $this->createElement('text', 'num_women_student')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Feto Nain Hira'); $elements[] = $this->createElement('text', 'num_men_student')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Mane Nain Hira'); $elements[] = $this->createElement('text', 'num_total_student')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Total Partisipante'); $elements[] = $this->createElement('text', 'student_payment')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 20)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Pagamentu Estudante'); $elements[] = $this->createElement('text', 'description_payment')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 500)->setAttrib('class', 'm-wrap span12')->setLabel('Deskrisaun Pagamentu Partisipante'); $elements[] = $this->createElement('text', 'subsidy')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 20)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Subsidiu'); $elements[] = $this->createElement('text', 'description_subsity')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 500)->setAttrib('class', 'm-wrap span12')->setLabel('Deskrisaun Subsidiu'); $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); }