function initEditForm() { $this->lng->loadLanguageModule($this->object->getType()); $this->setEditTabs(); include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt($this->object->getType() . "_edit")); // Show didactic template type $this->initDidacticTemplate($form); // sorting include_once 'Services/Container/classes/class.ilContainerSortingSettings.php'; $settings = new ilContainerSortingSettings($this->object->getId()); $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting"); $sort_title = new ilRadioOption($this->lng->txt('sorting_title_header'), ilContainer::SORT_TITLE); $sort_title->setInfo($this->lng->txt('sorting_info_title')); $sort->addOption($sort_title); $sort_manual = new ilRadioOption($this->lng->txt('sorting_manual_header'), ilContainer::SORT_MANUAL); $sort_manual->setInfo($this->lng->txt('sorting_info_manual')); $sort->addOption($sort_manual); $sort->setValue($settings->getSortMode()); $form->addItem($sort); $this->showCustomIconsEditing(1, $form, false); // Edit ecs export settings include_once 'Modules/Category/classes/class.ilECSCategorySettings.php'; $ecs = new ilECSCategorySettings($this->object); $ecs->addSettingsToForm($form, 'cat'); $form->addCommandButton("update", $this->lng->txt("save")); $form->addCommandButton("addTranslation", $this->lng->txt("add_translation")); return $form; }
function initEditForm() { $this->lng->loadLanguageModule($this->object->getType()); $this->setEditTabs(); include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt($this->object->getType() . "_edit")); // title/description $trans = $this->object->getTranslations(); $def = $trans["Fobject"][0]; // default $title = new ilTextInputGUI($this->lng->txt("title"), "title"); $title->setRequired(true); $title->setSize(min(40, ilObject::TITLE_LENGTH)); $title->setMaxLength(ilObject::TITLE_LENGTH); $title->setValue($def["title"]); $form->addItem($title); if (sizeof($trans["Fobject"]) > 1) { include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php'; $languages = ilMDLanguageItem::_getLanguages(); $title->setInfo($this->lng->txt("language") . ": " . $languages[$def["lang"]] . ' <a href="' . $this->ctrl->getLinkTarget($this, "editTranslations") . '">» ' . $this->lng->txt("cat_more_translations") . '</a>'); unset($languages); } $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "desc"); $desc->setRows(2); $desc->setCols(40); $desc->setValue($def["desc"]); $form->addItem($desc); // Show didactic template type $this->initDidacticTemplate($form); // presentation $pres = new ilFormSectionHeaderGUI(); $pres->setTitle($this->lng->txt('obj_presentation')); $form->addItem($pres); $form = $this->initSortingForm($form, array(ilContainer::SORT_TITLE, ilContainer::SORT_CREATION, ilContainer::SORT_MANUAL)); // icon settings // $this->showCustomIconsEditing(1, $form, false); // Edit ecs export settings include_once 'Modules/Category/classes/class.ilECSCategorySettings.php'; $ecs = new ilECSCategorySettings($this->object); $ecs->addSettingsToForm($form, 'cat'); // services $sh = new ilFormSectionHeaderGUI(); $sh->setTitle($this->lng->txt('obj_features')); $form->addItem($sh); include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php'; ilObjectServiceSettingsGUI::initServiceSettingsForm($this->object->getId(), $form, array(ilObjectServiceSettingsGUI::INFO_TAB_VISIBILITY, ilObjectServiceSettingsGUI::NEWS_VISIBILITY, ilObjectServiceSettingsGUI::TAXONOMIES)); $form->addCommandButton("update", $this->lng->txt("save")); // $form->addCommandButton("addTranslation", $this->lng->txt("add_translation")); return $form; }