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('nonFormalScholarity');
     $elements[] = $this->createElement('hidden', 'fk_id_pertypescholarity')->setDecorators(array('ViewHelper'))->setValue(2)->setAttrib('class', 'no-clear');
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $optCategory = $mapperScholarity->getOptionsCategory(Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->addMultiOptions($optCategory)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setRequired(true)->setLabel('Kursu');
     // Search just for Non Formal Education Institute
     $filters['fk_id_pertypescholarity'] = Register_Model_Mapper_PerTypeScholarity::NON_FORMAL;
     $mapperEducationInsitute = new Register_Model_Mapper_EducationInstitute();
     $rows = $mapperEducationInsitute->listByFilters($filters);
     $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)->setRequired(true)->setAttrib('class', 'm-wrap span12 chosen');
     $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data Iniciu');
     $elements[] = $this->createElement('text', 'finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data Fim');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
 /**
  * 
  */
 public function init()
 {
     parent::init();
     $elements[] = $this->createElement('hidden', 'year')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_unit_cost')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'unit_cost')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_planning_course')->setDecorators(array('ViewHelper'));
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $categories = $mapperScholarity->getOptionsCategory(Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $optCategory[''] = '';
     foreach ($categories as $id => $category) {
         $optCategory[$id] = $category;
     }
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->addMultiOptions($optCategory)->setRegisterInArrayValidator(false)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setAttrib('onchange', 'Fefop.FPAnnualPlanning.fetchUnitCost()')->setLabel('Kursu')->setRegisterInArrayValidator(false)->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', 'unit_cost')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12 money-mask')->setAttrib('onchange', 'Fefop.FPAnnualPlanning.calcTotalFormation()')->setLabel('Kustu Unitariu');
     $elements[] = $this->createElement('text', 'total_cost')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Kustu total');
     $elements[] = $this->createElement('text', 'total_students')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setAttrib('onchange', 'Fefop.FPAnnualPlanning.calcTotalFormation()')->setLabel('Total Partisipante');
     $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)->setAttrib('class', 'm-wrap span12 date-mask date')->setRequired(true)->setLabel('Loron Remata');
     $this->getElement('year_planning')->setAttrib('disabled', true);
     $this->addElements($elements);
 }
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('search');
     $elements = array();
     $mapperFPAnnualPlanning = new Fefop_Model_Mapper_FPAnnualPlanning();
     $rows = $mapperFPAnnualPlanning->listInstitutes();
     $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 ba formasaun ne\'ebé akreditadu');
     $optYear[''] = '';
     $finalYear = 2014 + 10;
     for ($yearIni = 2014 - 2; $yearIni <= $finalYear; $yearIni++) {
         $optYear[$yearIni] = $yearIni;
     }
     $elements[] = $this->createElement('select', 'year_planning')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optYear)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Tinan');
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $categories = $mapperScholarity->getOptionsCategory(Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $optCategory[''] = '';
     foreach ($categories as $id => $category) {
         $optCategory[$id] = $category;
     }
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optCategory)->setRegisterInArrayValidator(false)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu')->setRegisterInArrayValidator(false);
     $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 searchCategoryAction()
 {
     $type = $this->_getParam('id');
     $categories = $this->_mapper->getOptionsCategory($type);
     unset($categories['N']);
     $opts = array();
     foreach ($categories as $id => $value) {
         $opts[] = array('id' => $id, 'name' => $value);
     }
     $this->_helper->json($opts);
 }
Exemple #5
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_fefpstudentclass')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('course');
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $optCategory = $mapperScholarity->getOptionsCategory(Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->addMultiOptions($optCategory)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Kursu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Exemple #6
0
 /**
  * 
  */
 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);
 }
Exemple #7
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('text', 'cost')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Folin Hira')->setRequired(true);
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $categories = $mapperScholarity->getOptionsCategory(Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $optCategory[''] = '';
     foreach ($categories as $id => $category) {
         $optCategory[$id] = $category;
     }
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->addMultiOptions($optCategory)->setRegisterInArrayValidator(false)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu')->setRegisterInArrayValidator(false)->setRequired(true);
     $elements[] = $this->createElement('textarea', 'comment')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 3)->setRequired(true)->setLabel('Deskrisaun');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
 /**
  * 
  */
 public function searchCategoryAction()
 {
     $type = $this->_getParam('id');
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $categories = $mapperScholarity->getOptionsCategory($type);
     $opts = array();
     foreach ($categories as $id => $value) {
         $opts[] = array('id' => $id, 'name' => $value);
     }
     $this->_helper->json($opts);
 }