Esempio n. 1
0
 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()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear');
     $elements[] = $this->createElement('hidden', 'id_relationship')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('course');
     $elements[] = $this->createElement('hidden', 'scholarity_classification')->setDecorators(array('ViewHelper'))->setValue('course');
     $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);
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setRegisterInArrayValidator(false)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_scholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu')->setRegisterInArrayValidator(false)->setRequired(true);
     /*
     	$optClassification[''] = '';
     	$optClassification['R'] = 'Rejistrasaun';
     	//$optClassification['A'] = 'Acreditasaun';
     	$optClassification['C'] = 'Formasaun Comunitaria';
     	
     	$elements[] = $this->createElement( 'select', 'classification' )
     			    ->setDecorators( $this->getDefaultElementDecorators() )
     			    ->setAttrib( 'class', 'm-wrap span12' )
     			    ->setLabel( 'Klasifikasaun' )
     			    ->addMultiOptions( $optClassification );
     */
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
Esempio n. 3
0
 /**
  * 
  */
 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);
 }
 /**
  * 
  */
 public function listAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->view->rows = $this->_mapper->fetchAll();
 }