/** * Init map creation/update form */ function initCharacteristicForm($a_target, $a_types) { global $ilCtrl, $lng; // edit form include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); $this->form->setTitle($this->lng->txt("cont_choose_characteristic")); if ($a_types["par"] == "par") { $select_prop = new ilSelectInputGUI($this->lng->txt("cont_choose_characteristic_text"), "char_par"); include_once "./Services/COPage/classes/class.ilPCParagraphGUI.php"; $options = ilPCParagraphGUI::_getCharacteristics($this->page_gui->getStyleId()); $select_prop->setOptions($options); $this->form->addItem($select_prop); } if ($a_types["sec"] == "sec") { $select_prop = new ilSelectInputGUI($this->lng->txt("cont_choose_characteristic_section"), "char_sec"); include_once "./Services/COPage/classes/class.ilPCSectionGUI.php"; $options = ilPCSectionGUI::_getCharacteristics($this->page_gui->getStyleId()); $select_prop->setOptions($options); $this->form->addItem($select_prop); } foreach ($a_target as $t) { $hidden = new ilHiddenInputGUI("target[]"); $hidden->setValue($t); $this->form->addItem($hidden); } $this->form->setFormAction($ilCtrl->getFormAction($this)); $this->form->addCommandButton("assignCharacteristic", $lng->txt("save")); $this->form->addCommandButton("showPage", $lng->txt("cancel")); }