Example #1
0
 public function createForm()
 {
     $oCategorie = new Projet_Form_Element_Text(self::CATEGORIE);
     $oCategorie->setLabel('Categorie')->setRequired(true);
     $oDescription = new Projet_Form_Element_TextArea(self::DESCRIPTION);
     $oDescription->setLabel('Description');
     $this->addElementsWithSubmit(array($oCategorie, $oDescription), 'Enregistrer');
     $this->setAttrib('class', CSS_FORM_MEDIUM);
     $this->setDefaultDecorators();
 }
Example #2
0
 public function createForm(array $aCategories, array $aConservation, array $aUnites)
 {
     $oLibelle = new Projet_Form_Element_Text(self::LIBELLE);
     $oLibelle->setLabel('Libelle')->setRequired(true);
     $oDescription = new Projet_Form_Element_TextArea(self::DESCRIPTION);
     $oDescription->setLabel('Description');
     $oCategorie = new Projet_Form_Element_Select(self::CATEGORIE);
     $oCategorie->setLabel('Categorie')->setMultiOptions($aCategories);
     $oTypeConservation = new Projet_Form_Element_MultiCheckBox(self::CONSERVATION);
     $oTypeConservation->setLabel('Conservation')->setMultiOptions($aConservation);
     $oMesure = new Projet_Form_Element_Select(self::MESURE);
     $oMesure->setLabel('Unité de mesure')->setMultiOptions($aUnites);
     $this->addElementsWithSubmit(array($oCategorie, $oLibelle, $oTypeConservation, $oMesure, $oDescription), 'Enregistrer');
     $this->setAttrib('class', CSS_FORM_MEDIUM);
     $this->setDefaultDecorators();
 }