/** * Init standard search form. */ public function getSearchAreaForm() { global $lng, $ilCtrl; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setOpenTag(false); $form->setCloseTag(false); // term combination $radg = new ilHiddenInputGUI('search_term_combination'); $radg->setValue(ilSearchSettings::getInstance()->getDefaultOperator()); $form->addItem($radg); // search area include_once "./Services/Form/classes/class.ilRepositorySelectorInputGUI.php"; $ti = new ilRepositorySelectorInputGUI($lng->txt("search_area"), "area"); $ti->setSelectText($lng->txt("search_select_search_area")); $form->addItem($ti); $ti->readFromSession(); // alex, 15.8.2012: Added the following lines to get the value // from the main menu top right input search form if (isset($_POST["root_id"])) { $ti->setValue($_POST["root_id"]); $ti->writeToSession(); } $form->setFormAction($ilCtrl->getFormAction($this, 'performSearch')); return $form; }
/** * Init area editing form. * * @param int $a_mode Edit Mode */ public function initAreaEditingForm($a_edit_property) { global $lng, $ilCtrl; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setOpenTag(false); $form->setCloseTag(false); // name if ($a_edit_property != "link" && $a_edit_property != "shape") { $ti = new ilTextInputGUI($lng->txt("cont_name"), "area_name"); $ti->setMaxLength(200); $ti->setSize(20); $ti->setRequired(true); $form->addItem($ti); } // save and cancel commands if ($a_edit_property == "") { $form->setTitle($lng->txt("cont_new_trigger_area")); $form->addCommandButton("saveArea", $lng->txt("save")); } else { $form->setTitle($lng->txt("cont_new_area")); $form->addCommandButton("saveArea", $lng->txt("save")); } return $form; }
/** * Init area editing form. * * @param int $a_mode Edit Mode */ public function initAreaEditingForm($a_edit_property) { global $lng, $ilCtrl; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setOpenTag(false); $form->setCloseTag(false); // link if ($a_edit_property != "shape") { // $radg = new ilRadioGroupInputGUI($lng->txt("cont_link"), "area_link_type"); if ($_SESSION["il_map_il_ltype"] != "int") { if ($_SESSION["il_map_el_href"] == "") { $radg->setValue("no"); } else { $radg->setValue("ext"); } } else { $radg->setValue("int"); } // external link $ext = new ilRadioOption($lng->txt("cont_link_ext"), "ext"); $radg->addOption($ext); $ti = new ilTextInputGUI("", "area_link_ext"); $ti->setMaxLength(200); $ti->setSize(50); if ($_SESSION["il_map_el_href"] != "") { $ti->setValue($_SESSION["il_map_el_href"]); } else { $ti->setValue("http://"); } $ext->addSubItem($ti); // internal link $int = new ilRadioOption($lng->txt("cont_link_int"), "int"); $radg->addOption($int); $ne = new ilNonEditableValueGUI("", "", true); $link_str = ""; if ($_SESSION["il_map_il_target"] != "") { $link_str = $this->getMapAreaLinkString($_SESSION["il_map_il_target"], $_SESSION["il_map_il_type"], $_SESSION["il_map_il_targetframe"]); } $ne->setValue($link_str . ' <a id="iosEditInternalLinkTrigger" href="#">' . "[" . $lng->txt("cont_get_link") . "]" . '</a>'); $int->addSubItem($ne); // no link $no = new ilRadioOption($lng->txt("cont_link_no"), "no"); $radg->addOption($no); $form->addItem($radg); } // name if ($a_edit_property != "link" && $a_edit_property != "shape") { $ti = new ilTextInputGUI($lng->txt("cont_name"), "area_name"); $ti->setMaxLength(200); $ti->setSize(20); $form->addItem($ti); } // save and cancel commands if ($a_edit_property == "") { $form->setTitle($lng->txt("cont_new_area")); $form->addCommandButton("saveArea", $lng->txt("save")); } else { $form->setTitle($lng->txt("cont_new_area")); $form->addCommandButton("saveArea", $lng->txt("save")); } // $form->setFormAction($ilCtrl->getFormAction($this)); return $form; }