/** * Init form settings */ protected function dInitFormTreeSettings(ilPropertyFormGUI $form = null) { include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSMappingUtils.php'; include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php'; if ($form instanceof ilPropertyFormGUI) { return $form; } include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php'; $assignment = new ilECSNodeMappingAssignment($this->getServer()->getServerId(), $this->getMid(), (int) $_REQUEST['tid'], 0); include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, 'dEditTree')); $form->setTitle($this->lng->txt('general_settings')); $form->addCommandButton('dUpdateTreeSettings', $this->lng->txt('save')); $form->addCommandButton('dTrees', $this->lng->txt('cancel')); $form->setTableWidth('30%'); // CMS id (readonly) include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php'; $cmsid = new ilNumberInputGUI($this->lng->txt('ecs_cms_id'), 'cmsid'); $cmsid->setValue(ilECSCmsData::lookupCmsId(ilECSCmsTree::lookupRootId((int) $_REQUEST['tid']))); $cmsid->setDisabled(true); $cmsid->setSize(7); $cmsid->setMaxLength(12); $form->addItem($cmsid); $mapping_status = ilECSMappingUtils::lookupMappingStatus($this->getServer()->getServerId(), $this->getMid(), (int) $_REQUEST['tid']); $mapping_advanced = $mapping_status != ilECSMappingUtils::MAPPED_MANUAL ? true : false; // Status (readonly) $status = new ilNonEditableValueGUI($this->lng->txt('status'), ''); $status->setValue(ilECSMappingUtils::mappingStatusToString($mapping_status)); $form->addItem($status); // title update $title = new ilCheckboxInputGUI($this->lng->txt('ecs_title_updates'), 'title'); $title->setValue(1); $title->setChecked($assignment->isTitleUpdateEnabled()); #$title->setInfo($this->lng->txt('ecs_title_update_info')); $form->addItem($title); $position = new ilCheckboxInputGUI($this->lng->txt('ecs_position_updates'), 'position'); $position->setDisabled(!$mapping_advanced); $position->setChecked($mapping_advanced && $assignment->isPositionUpdateEnabled()); $position->setValue(1); #$position->setInfo($this->lng->txt('ecs_position_update_info')); $form->addItem($position); $tree = new ilCheckboxInputGUI($this->lng->txt('ecs_tree_updates'), 'tree'); $tree->setDisabled(!$mapping_advanced); $tree->setChecked($mapping_advanced && $assignment->isTreeUpdateEnabled()); $tree->setValue(1); #$tree->setInfo($this->lng->txt('ecs_tree_update_info')); $form->addItem($tree); return $form; }