Beispiel #1
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_isicdivision')->setDecorators(array('ViewHelper'));
     $mapperSection = new Register_Model_Mapper_IsicSection();
     $sections = $mapperSection->fetchAll();
     $optSections[''] = '';
     foreach ($sections as $section) {
         $optSections[$section['id_isicsection']] = $section['name_section'];
     }
     $elements[] = $this->createElement('select', 'fk_id_isicsection')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Sesaun')->addMultiOptions($optSections)->setRequired(true);
     $elements[] = $this->createElement('text', 'name_disivion')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Divizaun')->setRequired(true);
     $elements[] = $this->createElement('text', 'acronym')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 1)->setAttrib('class', 'm-wrap span4')->setLabel('Sigla')->setRequired(true);
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Deskrisaun');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
Beispiel #2
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_addsucu')->setDecorators(array('ViewHelper'));
     $mapperSection = new Register_Model_Mapper_IsicSection();
     $section = $mapperSection->fetchAll();
     $mapperCountry = new Register_Model_Mapper_AddCountry();
     $countries = $mapperCountry->fetchAll();
     $optNations[''] = '';
     foreach ($countries as $country) {
         $optNations[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->addMultiOptions($optNations)->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Distritu')->setRegisterInArrayValidator(false)->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Sub-Distritu')->setRegisterInArrayValidator(false)->setRequired(true);
     $elements[] = $this->createElement('text', 'sucu')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Suku')->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
 }