function listTechnical()
 {
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.md_editor.html', 'Services/MetaData');
     $this->__setTabs('meta_technical');
     $this->tpl->addBlockFile('MD_CONTENT', 'md_content', 'tpl.md_technical.html', 'Services/MetaData');
     $this->ctrl->setParameter($this, "section", "meta_technical");
     if (!is_object($this->md_section = $this->md_obj->getTechnical())) {
         $this->tpl->setCurrentBlock("no_technical");
         $this->tpl->setVariable("TXT_NO_TECHNICAL", $this->lng->txt("meta_no_technical"));
         $this->tpl->setVariable("TXT_ADD_TECHNICAL", $this->lng->txt("meta_add"));
         $this->tpl->setVariable("ACTION_ADD_TECHNICAL", $this->ctrl->getLinkTarget($this, "addSection"));
         $this->tpl->parseCurrentBlock();
         return true;
     }
     $this->ctrl->setReturn($this, 'listTechnical');
     $this->ctrl->setParameter($this, "meta_index", $this->md_section->getMetaId());
     $this->tpl->setVariable("EDIT_ACTION", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("TXT_TECHNICAL", $this->lng->txt('meta_technical'));
     // Delete link
     $this->tpl->setVariable("ACTION_DELETE", $this->ctrl->getLinkTarget($this, "deleteSection"));
     $this->tpl->setVariable("TXT_DELETE", $this->lng->txt('delete'));
     // New element
     $this->__fillSubelements();
     // Format
     foreach ($ids = $this->md_section->getFormatIds() as $id) {
         $md_for =& $this->md_section->getFormat($id);
         $this->tpl->setCurrentBlock("format_loop");
         $this->ctrl->setParameter($this, 'meta_index', $id);
         $this->ctrl->setParameter($this, 'meta_path', 'meta_format');
         $this->tpl->setVariable("FORMAT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 'deleteElement'));
         $this->tpl->setVariable("FORMAT_LOOP_TXT_DELETE", $this->lng->txt('delete'));
         $this->tpl->setVariable("FORMAT_LOOP_NO", $id);
         $this->tpl->setVariable("FORMAT_LOOP_TXT_FORMAT", $this->lng->txt('meta_format'));
         $this->tpl->setVariable("FORMAT_LOOP_VAL", ilUtil::prepareFormOutput($md_for->getFormat()));
         $this->tpl->parseCurrentBlock();
     }
     // Size
     $this->tpl->setVariable("SIZE_TXT_SIZE", $this->lng->txt('meta_size'));
     $this->tpl->setVariable("SIZE_VAL", ilUtil::prepareFormOutput($this->md_section->getSize()));
     // Location
     foreach ($ids = $this->md_section->getLocationIds() as $id) {
         $md_loc =& $this->md_section->getLocation($id);
         $this->tpl->setCurrentBlock("location_loop");
         $this->ctrl->setParameter($this, 'meta_index', $id);
         $this->ctrl->setParameter($this, 'meta_path', 'meta_location');
         $this->tpl->setVariable("LOCATION_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 'deleteElement'));
         $this->tpl->setVariable("LOCATION_LOOP_TXT_DELETE", $this->lng->txt('delete'));
         $this->tpl->setVariable("LOCATION_LOOP_TXT_LOCATION", $this->lng->txt('meta_location'));
         $this->tpl->setVariable("LOCATION_LOOP_NO", $id);
         $this->tpl->setVariable("LOCATION_LOOP_TXT_TYPE", $this->lng->txt('meta_type'));
         $this->tpl->setVariable("LOCATION_LOOP_VAL", ilUtil::prepareFormOutput($md_loc->getLocation()));
         $this->tpl->setVariable("SEL_LOCATION_TYPE", ilMDUtilSelect::_getLocationTypeSelect($md_loc->getLocationType(), "met_location[" . $id . "][Type]", array(0 => $this->lng->txt('meta_please_select'))));
         $this->tpl->parseCurrentBlock();
     }
     // Requirement
     foreach ($ids = $this->md_section->getRequirementIds() as $id) {
         $md_re =& $this->md_section->getRequirement($id);
         $this->tpl->setCurrentBlock("requirement_loop");
         $this->ctrl->setParameter($this, 'meta_index', $id);
         $this->ctrl->setParameter($this, 'meta_path', 'meta_requirement');
         $this->tpl->setVariable("REQUIREMENT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 'deleteElement'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_DELETE", $this->lng->txt('delete'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_REQUIREMENT", $this->lng->txt('meta_requirement'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_TYPE", $this->lng->txt('meta_type'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_OPERATINGSYSTEM", $this->lng->txt('meta_operating_system'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_BROWSER", $this->lng->txt('meta_browser'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_NAME", $this->lng->txt('meta_name'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_MINIMUMVERSION", $this->lng->txt('meta_minimum_version'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_TXT_MAXIMUMVERSION", $this->lng->txt('meta_maximum_version'));
         $this->tpl->setVariable("REQUIREMENT_LOOP_NO", $id);
         $this->tpl->setVariable("REQUIREMENT_SEL_OS_NAME", ilMDUtilSelect::_getOperatingSystemSelect($md_re->getOperatingSystemName(), "met_re[" . $id . "][os][name]", array(0 => $this->lng->txt('meta_please_select'))));
         $this->tpl->setVariable("REQUIREMENT_SEL_BROWSER_NAME", ilMDUtilSelect::_getBrowserSelect($md_re->getBrowserName(), "met_re[" . $id . "][browser][name]", array(0 => $this->lng->txt('meta_please_select'))));
         $this->tpl->setVariable("REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION", ilUtil::prepareFormOutput($md_re->getOperatingSystemMinimumVersion()));
         $this->tpl->setVariable("REQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION", ilUtil::prepareFormOutput($md_re->getOperatingSystemMaximumVersion()));
         $this->tpl->setVariable("REQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION", ilUtil::prepareFormOutput($md_re->getBrowserMinimumVersion()));
         $this->tpl->setVariable("REQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION", ilUtil::prepareFormOutput($md_re->getBrowserMaximumVersion()));
         $this->tpl->parseCurrentBlock();
     }
     // OrComposite
     foreach ($ids = $this->md_section->getOrCompositeIds() as $or_id) {
         $md_or =& $this->md_section->getOrComposite($or_id);
         foreach ($ids = $md_or->getRequirementIds() as $id) {
             $md_re =& $this->md_section->getRequirement($id);
             $this->tpl->setCurrentBlock("orrequirement_loop");
             $this->ctrl->setParameter($this, 'meta_index', $id);
             $this->ctrl->setParameter($this, 'meta_path', 'meta_requirement');
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 'deleteElement'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_DELETE", $this->lng->txt('delete'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_REQUIREMENT", $this->lng->txt('meta_requirement'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_TYPE", $this->lng->txt('meta_type'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_OPERATINGSYSTEM", $this->lng->txt('meta_operating_system'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_BROWSER", $this->lng->txt('meta_browser'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_NAME", $this->lng->txt('meta_name'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_MINIMUMVERSION", $this->lng->txt('meta_minimum_version'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_TXT_MAXIMUMVERSION", $this->lng->txt('meta_maximum_version'));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_NO", $id);
             $this->tpl->setVariable("ORREQUIREMENT_SEL_OS_NAME", ilMDUtilSelect::_getOperatingSystemSelect($md_re->getOperatingSystemName(), "met_re[" . $id . "][os][name]", array(0 => $this->lng->txt('meta_please_select'))));
             $this->tpl->setVariable("ORREQUIREMENT_SEL_BROWSER_NAME", ilMDUtilSelect::_getBrowserSelect($md_re->getBrowserName(), "met_re[" . $id . "][browser][name]", array(0 => $this->lng->txt('meta_please_select'))));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MINIMUMVERSION", ilUtil::prepareFormOutput($md_re->getOperatingSystemMinimumVersion()));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_OPERATINGSYSTEM_MAXIMUMVERSION", ilUtil::prepareFormOutput($md_re->getOperatingSystemMaximumVersion()));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_BROWSER_MINIMUMVERSION", ilUtil::prepareFormOutput($md_re->getBrowserMinimumVersion()));
             $this->tpl->setVariable("ORREQUIREMENT_LOOP_VAL_BROWSER_MAXIMUMVERSION", ilUtil::prepareFormOutput($md_re->getBrowserMaximumVersion()));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("orcomposite_loop");
         $this->ctrl->setParameter($this, 'meta_index', $or_id);
         $this->ctrl->setParameter($this, 'meta_path', 'meta_or_composite');
         $this->ctrl->setParameter($this, 'meta_technical', $this->md_section->getMetaId());
         $this->tpl->setVariable("ORCOMPOSITE_LOOP_ACTION_DELETE", $this->ctrl->getLinkTarget($this, 'deleteElement'));
         $this->tpl->setVariable("ORCOMPOSITE_LOOP_TXT_DELETE", $this->lng->txt('delete'));
         $this->tpl->setVariable("ORCOMPOSITE_LOOP_TXT_ORCOMPOSITE", $this->lng->txt('meta_or_composite'));
         $this->tpl->parseCurrentBlock();
     }
     // InstallationRemarks
     $this->tpl->setVariable("INSTALLATIONREMARKS_TXT_INSTALLATIONREMARKS", $this->lng->txt('meta_installation_remarks'));
     $this->tpl->setVariable("INSTALLATIONREMARKS_TXT_LANGUAGE", $this->lng->txt('meta_language'));
     $this->tpl->setVariable("INSTALLATIONREMARKS_VAL", ilUtil::prepareFormOutput($this->md_section->getInstallationRemarks()));
     $this->tpl->setVariable("INSTALLATIONREMARKS_VAL_LANGUAGE", $this->__showLanguageSelect('inst_language', $this->md_section->getInstallationRemarksLanguageCode()));
     // Other platform requirement
     $this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_TXT_OTHERPLATTFORMREQUIREMENTS", $this->lng->txt('meta_other_plattform_requirements'));
     $this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_TXT_LANGUAGE", $this->lng->txt('meta_language'));
     $this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_VAL", ilUtil::prepareFormOutput($this->md_section->getOtherPlatformRequirements()));
     $this->tpl->setVariable("OTHERPLATTFORMREQUIREMENTS_VAL_LANGUAGE", $this->__showLanguageSelect('opr_language', $this->md_section->getOtherPlatformRequirementsLanguageCode()));
     // Duration
     $this->tpl->setVariable("DURATION_TXT_DURATION", $this->lng->txt('meta_duration'));
     $this->tpl->setVariable("DURATION_VAL", ilUtil::prepareFormOutput($this->md_section->getDuration()));
     $this->tpl->setCurrentBlock("technical");
     $this->tpl->setVariable("TXT_SAVE", $this->lng->txt('save'));
     $this->tpl->parseCurrentBlock();
 }
 public function getFormElement($a_query, $a_field_name)
 {
     include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
     $a_post_name = 'query[' . $a_field_name . ']';
     switch ($a_field_name) {
         case 'general_offline':
             $offline_options = array('0' => $this->lng->txt('search_any'), self::ONLINE_QUERY => $this->lng->txt('search_option_online'), self::OFFLINE_QUERY => $this->lng->txt('search_option_offline'));
             $offline = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $offline->setOptions($offline_options);
             $offline->setValue($a_query['general_offline']);
             return $offline;
         case 'lom_content':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_content']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
             // General
         // General
         case 'lom_language':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_language']);
             $select->setOptions(ilMDUtilSelect::_getLanguageSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_keyword':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_keyword']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         case 'lom_coverage':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_coverage']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         case 'lom_structure':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_structure']);
             $select->setOptions(ilMDUtilSelect::_getStructureSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
             // Lifecycle
         // Lifecycle
         case 'lom_status':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_status']);
             $select->setOptions(ilMDUtilSelect::_getStatusSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_version':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_version']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         case 'lom_contribute':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], 'query[' . 'lom_role' . ']');
             $select->setValue($a_query['lom_role']);
             $select->setOptions(ilMDUtilSelect::_getRoleSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             $text = new ilTextInputGUI($this->lng->txt('meta_entry'), 'query[' . 'lom_role_entry' . ']');
             $text->setValue($a_query['lom_role_entry']);
             $text->setSize(30);
             $text->setMaxLength(255);
             $select->addSubItem($text);
             return $select;
             // Technical
         // Technical
         case 'lom_format':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_format']);
             $select->setOptions(ilMDUtilSelect::_getFormatSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_operating_system':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_operating_system']);
             $select->setOptions(ilMDUtilSelect::_getOperatingSystemSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_browser':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_browser']);
             $select->setOptions(ilMDUtilSelect::_getBrowserSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
             // Education
         // Education
         case 'lom_interactivity':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_interactivity']);
             $select->setOptions(ilMDUtilSelect::_getInteractivityTypeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_resource':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_resource']);
             $select->setOptions(ilMDUtilSelect::_getLearningResourceTypeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_level':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getInteractivityLevelSelect($a_query['lom_level_start'], 'query[' . 'lom_level_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getInteractivityLevelSelect($a_query['lom_level_end'], 'query[' . 'lom_level_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
         case 'lom_density':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getSemanticDensitySelect($a_query['lom_density_start'], 'query[' . 'lom_density_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getSemanticDensitySelect($a_query['lom_density_end'], 'query[' . 'lom_density_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
         case 'lom_user_role':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_user_role']);
             $select->setOptions(ilMDUtilSelect::_getIntendedEndUserRoleSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_context':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_context']);
             $select->setOptions(ilMDUtilSelect::_getContextSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_difficulty':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getDifficultySelect($a_query['lom_difficulty_start'], 'query[' . 'lom_difficulty_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getDifficultySelect($a_query['lom_difficulty_end'], 'query[' . 'lom_difficulty_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
             // Rights
         // Rights
         case 'lom_costs':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_costs']);
             $select->setOptions(ilMDUtilSelect::_getCostsSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_copyright':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_copyright']);
             $select->setOptions(ilMDUtilSelect::_getCopyrightAndOtherRestrictionsSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
             // Classification
         // Classification
         case 'lom_purpose':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_purpose']);
             $select->setOptions(ilMDUtilSelect::_getPurposeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_taxon':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_taxon']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         default:
             if (substr($a_field_name, 0, 3) != 'adv') {
                 break;
             }
             // Advanced meta data
             $field_id = substr($a_field_name, 4);
             include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
             $field = ilAdvancedMDFieldDefinition::_getInstanceByFieldId($field_id);
             switch ($field->getFieldType()) {
                 case ilAdvancedMDFieldDefinition::TYPE_TEXT:
                     $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
                     $text->setSubmitFormOnEnter(true);
                     $text->setValue($a_query[$a_field_name]);
                     $text->setSize(30);
                     $text->setMaxLength(255);
                     return $text;
                 case ilAdvancedMDFieldDefinition::TYPE_SELECT:
                     $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
                     $select->setValue($a_query[$a_field_name]);
                     $select->setOptions($field->getFieldValuesForSearch());
                     return $select;
                 case ilAdvancedMDFieldDefinition::TYPE_DATE:
                 case ilAdvancedMDFieldDefinition::TYPE_DATETIME:
                     $check = new ilCheckboxInputGUI($this->active_fields[$a_field_name], $a_post_name);
                     $check->setValue(1);
                     $check->setChecked($a_query[$a_field_name]);
                     $time = new ilDateTimeInputGUI($this->lng->txt('from'), $a_field_name . '_start');
                     $time->setShowTime($field->getFieldType() != ilAdvancedMDFieldDefinition::TYPE_DATE);
                     $time->setDate(new ilDateTime(mktime(8, 0, 0, date('m'), date('d'), date('Y')), IL_CAL_UNIX));
                     $check->addSubItem($time);
                     $time = new ilDateTimeInputGUI($this->lng->txt('until'), $a_field_name . '_end');
                     $time->setShowTime($field->getFieldType() != ilAdvancedMDFieldDefinition::TYPE_DATE);
                     $time->setDate(new ilDateTime(mktime(16, 0, 0, date('m'), date('d'), date('Y')), IL_CAL_UNIX));
                     $check->addSubItem($time);
                     return $check;
             }
     }
     return null;
 }
 public function getFormElement($a_query, $a_field_name, ilPropertyFormGUI $a_form)
 {
     include_once './Services/MetaData/classes/class.ilMDUtilSelect.php';
     $a_post_name = 'query[' . $a_field_name . ']';
     switch ($a_field_name) {
         case 'general_offline':
             $offline_options = array('0' => $this->lng->txt('search_any'), self::ONLINE_QUERY => $this->lng->txt('search_option_online'), self::OFFLINE_QUERY => $this->lng->txt('search_option_offline'));
             $offline = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $offline->setOptions($offline_options);
             $offline->setValue($a_query['general_offline']);
             return $offline;
         case 'lom_content':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_content']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
             // General
         // General
         case 'lom_language':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_language']);
             $select->setOptions(ilMDUtilSelect::_getLanguageSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_keyword':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_keyword']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         case 'lom_coverage':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_coverage']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         case 'lom_structure':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_structure']);
             $select->setOptions(ilMDUtilSelect::_getStructureSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
             // Lifecycle
         // Lifecycle
         case 'lom_status':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_status']);
             $select->setOptions(ilMDUtilSelect::_getStatusSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_version':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_version']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         case 'lom_contribute':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], 'query[' . 'lom_role' . ']');
             $select->setValue($a_query['lom_role']);
             $select->setOptions(ilMDUtilSelect::_getRoleSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             $text = new ilTextInputGUI($this->lng->txt('meta_entry'), 'query[' . 'lom_role_entry' . ']');
             $text->setValue($a_query['lom_role_entry']);
             $text->setSize(30);
             $text->setMaxLength(255);
             $select->addSubItem($text);
             return $select;
             // Technical
         // Technical
         case 'lom_format':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_format']);
             $select->setOptions(ilMDUtilSelect::_getFormatSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_operating_system':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_operating_system']);
             $select->setOptions(ilMDUtilSelect::_getOperatingSystemSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_browser':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_browser']);
             $select->setOptions(ilMDUtilSelect::_getBrowserSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
             // Education
         // Education
         case 'lom_interactivity':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_interactivity']);
             $select->setOptions(ilMDUtilSelect::_getInteractivityTypeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_resource':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_resource']);
             $select->setOptions(ilMDUtilSelect::_getLearningResourceTypeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_level':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getInteractivityLevelSelect($a_query['lom_level_start'], 'query[' . 'lom_level_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getInteractivityLevelSelect($a_query['lom_level_end'], 'query[' . 'lom_level_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
         case 'lom_density':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getSemanticDensitySelect($a_query['lom_density_start'], 'query[' . 'lom_density_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getSemanticDensitySelect($a_query['lom_density_end'], 'query[' . 'lom_density_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
         case 'lom_user_role':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_user_role']);
             $select->setOptions(ilMDUtilSelect::_getIntendedEndUserRoleSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_context':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_context']);
             $select->setOptions(ilMDUtilSelect::_getContextSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_difficulty':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getDifficultySelect($a_query['lom_difficulty_start'], 'query[' . 'lom_difficulty_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getDifficultySelect($a_query['lom_difficulty_end'], 'query[' . 'lom_difficulty_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
             // Rights
         // Rights
         case 'lom_costs':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_costs']);
             $select->setOptions(ilMDUtilSelect::_getCostsSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_copyright':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_copyright']);
             $select->setOptions(ilMDUtilSelect::_getCopyrightAndOtherRestrictionsSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
             // Classification
         // Classification
         case 'lom_purpose':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_purpose']);
             $select->setOptions(ilMDUtilSelect::_getPurposeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_taxon':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_taxon']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         default:
             if (substr($a_field_name, 0, 3) != 'adv') {
                 break;
             }
             // Advanced meta data
             $field_id = substr($a_field_name, 4);
             include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
             $field = ilAdvancedMDFieldDefinition::getInstance($field_id);
             $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($field->getADTDefinition(), true, false);
             $field_form->setForm($a_form);
             $field_form->setElementId($a_post_name);
             $field_form->setTitle($this->active_fields[$a_field_name]);
             $field_form->addToForm();
             // reload search values
             if (isset($a_query[$a_field_name])) {
                 $field_form->importFromPost($a_query);
                 $field_form->validate();
             }
             return;
     }
     return null;
 }