当前位置: 首页>>代码示例>>PHP>>正文


PHP ilCustomInputGUI::setHTML方法代码示例

本文整理汇总了PHP中ilCustomInputGUI::setHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCustomInputGUI::setHTML方法的具体用法?PHP ilCustomInputGUI::setHTML怎么用?PHP ilCustomInputGUI::setHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilCustomInputGUI的用法示例。


在下文中一共展示了ilCustomInputGUI::setHTML方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initCategoryMappingForm

 /**
  * Init category mapping form 
  * @return
  */
 protected function initCategoryMappingForm($a_mode = 'add')
 {
     global $ilDB;
     if (is_object($this->form)) {
         return true;
     }
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     include_once './Services/WebServices/ECS/classes/class.ilECSCategoryMappingRule.php';
     $this->form = new ilPropertyFormGUI();
     if ($a_mode == 'add') {
         $this->form->setTitle($this->lng->txt('ecs_new_category_mapping'));
         $this->form->setFormAction($this->ctrl->getFormAction($this, 'categoryMapping'));
         $this->form->addCommandButton('addCategoryMapping', $this->lng->txt('save'));
         $this->form->addCommandButton('categoryMapping', $this->lng->txt('cancel'));
     } else {
         $this->form->setTitle($this->lng->txt('ecs_edit_category_mapping'));
         $this->form->setFormAction($this->ctrl->getFormAction($this, 'editCategoryMapping'));
         $this->form->addCommandButton('updateCategoryMapping', $this->lng->txt('save'));
         $this->form->addCommandButton('categoryMapping', $this->lng->txt('cancel'));
     }
     $imp = new ilCustomInputGUI($this->lng->txt('ecs_import_id'), 'import_id');
     $imp->setRequired(true);
     $tpl = new ilTemplate('tpl.ecs_import_id_form.html', true, true, 'Services/WebServices/ECS');
     $tpl->setVariable('SIZE', 5);
     $tpl->setVariable('MAXLENGTH', 11);
     $tpl->setVariable('POST_VAR', 'import_id');
     $tpl->setVariable('PROPERTY_VALUE', $this->rule->getContainerId());
     if ($this->settings->getImportId()) {
         $tpl->setVariable('COMPLETE_PATH', $this->buildPath($this->rule->getContainerId()));
     }
     $imp->setHTML($tpl->get());
     $imp->setInfo($this->lng->txt('ecs_import_id_info'));
     $this->form->addItem($imp);
     include_once './Services/WebServices/ECS/classes/class.ilECSCategoryMapping.php';
     $select = new ilSelectInputGUI($this->lng->txt('ecs_attribute_name'), 'field');
     $select->setValue($this->rule->getFieldName());
     $select->setRequired(true);
     $select->setOptions(ilECSCategoryMapping::getPossibleFields());
     $this->form->addItem($select);
     //	Value
     $value = new ilRadioGroupInputGUI($this->lng->txt('ecs_cat_mapping_type'), 'type');
     $value->setValue($this->rule->getMappingType());
     $value->setRequired(true);
     $fixed = new ilRadioOption($this->lng->txt('ecs_cat_mapping_fixed'), ilECSCategoryMappingRule::TYPE_FIXED);
     $fixed->setInfo($this->lng->txt('ecs_cat_mapping_fixed_info'));
     $fixed_val = new ilTextInputGUI($this->lng->txt('ecs_cat_mapping_values'), 'mapping_value');
     $fixed_val->setValue($this->rule->getMappingValue());
     $fixed_val->setMaxLength(255);
     $fixed_val->setSize(40);
     $fixed_val->setRequired(true);
     $fixed->addSubItem($fixed_val);
     $value->addOption($fixed);
     $duration = new ilRadioOption($this->lng->txt('ecs_cat_mapping_duration'), ilECSCategoryMappingRule::TYPE_DURATION);
     $duration->setInfo($this->lng->txt('ecs_cat_mapping_duration_info'));
     $dur_start = new ilDateTimeInputGUI($this->lng->txt('from'), 'dur_begin');
     $dur_start->setDate($this->rule->getDateRangeStart());
     $duration->addSubItem($dur_start);
     $dur_end = new ilDateTimeInputGUI($this->lng->txt('to'), 'dur_end');
     $dur_end->setDate($this->rule->getDateRangeEnd());
     $duration->addSubItem($dur_end);
     $value->addOption($duration);
     $type = new ilRadioOption($this->lng->txt('ecs_cat_mapping_by_type'), ilECSCategoryMappingRule::TYPE_BY_TYPE);
     $type->setInfo($this->lng->txt('ecs_cat_mapping_by_type_info'));
     $options = ilECSUtils::getPossibleRemoteTypes(true);
     $types = new ilSelectInputGUI($this->lng->txt('type'), 'by_type');
     $types->setOptions($options);
     $types->setValue($this->rule->getByType());
     $types->setRequired(true);
     $type->addSubitem($types);
     $value->addOption($type);
     $this->form->addItem($value);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:76,代码来源:class.ilECSSettingsGUI.php

示例2: getFormElement


//.........这里部分代码省略.........
             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));
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:67,代码来源:class.ilLuceneAdvancedSearchFields.php

示例3: initSettingsTypeForm

 /**
  * Init the form to change the settings value type
  *
  * @return   object  property form to change settings type
  */
 function initSettingsTypeForm()
 {
     include_once "./Services/Administration/classes/class.ilSetting.php";
     $type = ilSetting::_getValueType();
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setId("settings_type");
     $form->setTitle($this->lng->txt("settings_type"));
     $form->setFormAction("setup.php?cmd=gateway");
     $item = new ilNonEditableValueGUI($this->lng->txt('settings_type_current'));
     $item->setValue(strtoupper($type));
     if ($type == "clob") {
         $item->setInfo($this->lng->txt('settings_info_clob'));
         $form->addCommandButton("showLongerSettings", $this->lng->txt("settings_show_longer"));
         $form->addCommandButton("changeSettingsType", $this->lng->txt("settings_change_text"));
     } else {
         $item->setInfo($this->lng->txt('settings_info_text'));
         $form->addCommandButton("changeSettingsType", $this->lng->txt("settings_change_clob"));
     }
     $form->addItem($item);
     if (is_array($this->longer_settings)) {
         $item = new ilCustomInputGUI($this->lng->txt('settings_longer_values'));
         if (count($this->longer_settings)) {
             foreach ($this->longer_settings as $row) {
                 $subitem = new ilCustomInputGUI(sprintf($this->lng->txt('settings_key_info'), $row['module'], $row['keyword']));
                 $subitem->setInfo($row['value']);
                 $item->addSubItem($subitem);
             }
         } else {
             $item->setHTML($this->lng->txt('settings_no_longer_values'));
         }
         $form->addItem($item);
     }
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:40,代码来源:class.ilSetupGUI.php

示例4: initMailRatersForm

 function initMailRatersForm($appr_id, array $rec_ids)
 {
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "mailRatersAction"));
     $form->setTitle($this->lng->txt('compose'));
     $all_data = $this->object->getRatersData($appr_id);
     $rec_data = array();
     foreach ($rec_ids as $rec_id) {
         if (isset($all_data[$rec_id])) {
             $rec_data[] = $all_data[$rec_id]["lastname"] . ", " . $all_data[$rec_id]["firstname"] . " (" . $all_data[$rec_id]["email"] . ")";
         }
     }
     sort($rec_data);
     $rec = new ilCustomInputGUI($this->lng->txt('recipients'));
     $rec->setHTML(implode("<br />", $rec_data));
     $form->addItem($rec);
     $subject = new ilTextInputGUI($this->lng->txt('subject'), 'subject');
     $subject->setSize(50);
     $subject->setRequired(true);
     $form->addItem($subject);
     $existingdata = $this->object->getExternalCodeRecipients();
     $existingcolumns = array();
     if (count($existingdata)) {
         $first = array_shift($existingdata);
         foreach ($first as $key => $value) {
             if (strcmp($key, 'code') != 0 && strcmp($key, 'email') != 0 && strcmp($key, 'sent') != 0) {
                 array_push($existingcolumns, '[' . $key . ']');
             }
         }
     }
     $mailmessage_u = new ilTextAreaInputGUI($this->lng->txt('survey_360_rater_message_content_registered'), 'message_u');
     $mailmessage_u->setRequired(true);
     $mailmessage_u->setCols(80);
     $mailmessage_u->setRows(10);
     $form->addItem($mailmessage_u);
     $mailmessage_a = new ilTextAreaInputGUI($this->lng->txt('survey_360_rater_message_content_anonymous'), 'message_a');
     $mailmessage_a->setRequired(true);
     $mailmessage_a->setCols(80);
     $mailmessage_a->setRows(10);
     $mailmessage_a->setInfo(sprintf($this->lng->txt('message_content_info'), join($existingcolumns, ', ')));
     $form->addItem($mailmessage_a);
     $recf = new ilHiddenInputGUI("rtr_id");
     $recf->setValue(implode(";", $rec_ids));
     $form->addItem($recf);
     $form->addCommandButton("mailRatersAction", $this->lng->txt("send"));
     $form->addCommandButton("editRaters", $this->lng->txt("cancel"));
     $subject->setValue(sprintf($this->lng->txt('survey_360_rater_subject_default'), $this->object->getTitle()));
     $mailmessage_u->setValue($this->lng->txt('survey_360_rater_message_content_registered_default'));
     $mailmessage_a->setValue($this->lng->txt('survey_360_rater_message_content_anonymous_default'));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:52,代码来源:class.ilSurveyParticipantsGUI.php

示例5: initPublicProfileForm

 /**
  * Init public profile form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initPublicProfileForm()
 {
     global $lng, $ilUser, $ilSetting;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setTitle($lng->txt("public_profile"));
     $this->form->setDescription($lng->txt("user_public_profile_info"));
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     $portfolio_id = $this->getProfilePortfolio();
     if (!$portfolio_id) {
         // Activate public profile
         $radg = new ilRadioGroupInputGUI($lng->txt("user_activate_public_profile"), "public_profile");
         $info = $this->lng->txt("user_activate_public_profile_info");
         $pub_prof = in_array($ilUser->prefs["public_profile"], array("y", "n", "g")) ? $ilUser->prefs["public_profile"] : "n";
         if (!$ilSetting->get('enable_global_profiles') && $pub_prof == "g") {
             $pub_prof = "y";
         }
         $radg->setValue($pub_prof);
         $op1 = new ilRadioOption($lng->txt("usr_public_profile_disabled"), "n", $lng->txt("usr_public_profile_disabled_info"));
         $radg->addOption($op1);
         $op2 = new ilRadioOption($lng->txt("usr_public_profile_logged_in"), "y");
         $radg->addOption($op2);
         if ($ilSetting->get('enable_global_profiles')) {
             $op3 = new ilRadioOption($lng->txt("usr_public_profile_global"), "g");
             $radg->addOption($op3);
         }
         $this->form->addItem($radg);
         // #11773
         if ($ilSetting->get('user_portfolios')) {
             // #10826
             $prtf = "<br />" . $lng->txt("user_profile_portfolio");
             $prtf .= "<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio\">&raquo; " . $lng->txt("user_portfolios") . "</a>";
             $info .= $prtf;
         }
         $radg->setInfo($info);
     } else {
         $prtf = $lng->txt("user_profile_portfolio_selected");
         $prtf .= "<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio&prt_id=" . $portfolio_id . "\">&raquo; " . $lng->txt("portfolio") . "</a>";
         $info = new ilCustomInputGUI($lng->txt("user_activate_public_profile"));
         $info->setHTML($prtf);
         $this->form->addItem($info);
     }
     $this->showPublicProfileFields($this->form, $ilUser->prefs);
     $this->form->addCommandButton("savePublicProfile", $lng->txt("save"));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:50,代码来源:class.ilPersonalProfileGUI.php

示例6: __initForm

 protected function __initForm()
 {
     global $lng, $ilUser;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     // code handling
     if ($this->code_enabled) {
         include_once 'Services/Registration/classes/class.ilRegistrationCode.php';
         $code = new ilTextInputGUI($lng->txt("registration_code"), "usr_registration_code");
         $code->setSize(40);
         $code->setMaxLength(ilRegistrationCode::CODE_LENGTH);
         if ((bool) $this->registration_settings->registrationCodeRequired()) {
             $code->setRequired(true);
             $code->setInfo($lng->txt("registration_code_required_info"));
         } else {
             $code->setInfo($lng->txt("registration_code_optional_info"));
         }
         $this->form->addItem($code);
     }
     // user defined fields
     $user_defined_data = $ilUser->getUserDefinedData();
     include_once './Services/User/classes/class.ilUserDefinedFields.php';
     $user_defined_fields =& ilUserDefinedFields::_getInstance();
     $custom_fields = array();
     foreach ($user_defined_fields->getRegistrationDefinitions() as $field_id => $definition) {
         if ($definition['field_type'] == UDF_TYPE_TEXT) {
             $custom_fields["udf_" . $definition['field_id']] = new ilTextInputGUI($definition['field_name'], "udf_" . $definition['field_id']);
             $custom_fields["udf_" . $definition['field_id']]->setValue($user_defined_data["f_" . $field_id]);
             $custom_fields["udf_" . $definition['field_id']]->setMaxLength(255);
             $custom_fields["udf_" . $definition['field_id']]->setSize(40);
         } else {
             if ($definition['field_type'] == UDF_TYPE_WYSIWYG) {
                 $custom_fields["udf_" . $definition['field_id']] = new ilTextAreaInputGUI($definition['field_name'], "udf_" . $definition['field_id']);
                 $custom_fields["udf_" . $definition['field_id']]->setValue($user_defined_data["f_" . $field_id]);
                 $custom_fields["udf_" . $definition['field_id']]->setUseRte(true);
             } else {
                 $custom_fields["udf_" . $definition['field_id']] = new ilSelectInputGUI($definition['field_name'], "udf_" . $definition['field_id']);
                 $custom_fields["udf_" . $definition['field_id']]->setValue($user_defined_data["f_" . $field_id]);
                 $custom_fields["udf_" . $definition['field_id']]->setOptions($user_defined_fields->fieldValuesToSelectArray($definition['field_values']));
             }
         }
         if ($definition['required']) {
             $custom_fields["udf_" . $definition['field_id']]->setRequired(true);
         }
     }
     // standard fields
     include_once "./Services/User/classes/class.ilUserProfile.php";
     $up = new ilUserProfile();
     $up->setMode(ilUserProfile::MODE_REGISTRATION);
     $up->skipGroup("preferences");
     // add fields to form
     $up->addStandardFieldsToForm($this->form, NULL, $custom_fields);
     unset($custom_fields);
     // set language selection to current display language
     $flang = $this->form->getItemByPostVar("usr_language");
     if ($flang) {
         $flang->setValue($lng->getLangKey());
     }
     // add information to role selection (if not hidden)
     if ($this->code_enabled) {
         $role = $this->form->getItemByPostVar("usr_roles");
         if ($role && $role->getType() == "select") {
             $role->setInfo($lng->txt("registration_code_role_info"));
         }
     }
     // user agreement
     $field = new ilFormSectionHeaderGUI();
     $field->setTitle($lng->txt("usr_agreement"));
     $this->form->addItem($field);
     $field = new ilCustomInputGUI();
     $field->setHTML('<div id="agreement">' . ilUserAgreement::_getText() . '</div>');
     $this->form->addItem($field);
     $field = new ilCheckboxInputGUI($lng->txt("accept_usr_agreement"), "usr_agreement");
     $field->setRequired(true);
     $field->setValue(1);
     $this->form->addItem($field);
     $this->form->addCommandButton("saveForm", $lng->txt("register"));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:79,代码来源:class.ilAccountRegistrationGUI.php

示例7: initFormDefinition

 /**
  * Init the form to add or edit a type
  * 
  * @param	string		xml data of input		
  */
 private function initFormDefinition($a_xml = null)
 {
     global $lng, $ilCtrl;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     if (!isset($a_xml)) {
         $a_xml = $this->type->getXML();
     }
     $form = new ilPropertyFormGUI();
     $form->setId('edit_xml');
     $form->setFormAction($ilCtrl->getFormAction($this));
     $form->setTitle($this->txt('type_definition'));
     $item = new ilCustomInputGUI('');
     $tpl = new ilTemplate('tpl.edit_xml.html', true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/ExternalContent/");
     $tpl->setVariable("CONTENT", ilUtil::prepareFormOutput($a_xml));
     $item->setHTML($tpl->get());
     $item->setInfo($this->txt('type_definition_info'));
     $form->addItem($item);
     $form->addCommandButton('submitFormDefinition', $lng->txt('save'));
     $this->form = $form;
 }
开发者ID:ilifau,项目名称:ExternalContent,代码行数:25,代码来源:class.ilExternalContentConfigGUI.php

示例8: __initForm

 protected function __initForm()
 {
     global $lng, $ilUser;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     // code handling
     if ($this->code_enabled) {
         include_once 'Services/Registration/classes/class.ilRegistrationCode.php';
         $code = new ilTextInputGUI($lng->txt("registration_code"), "usr_registration_code");
         $code->setSize(40);
         $code->setMaxLength(ilRegistrationCode::CODE_LENGTH);
         if ((bool) $this->registration_settings->registrationCodeRequired()) {
             $code->setRequired(true);
             $code->setInfo($lng->txt("registration_code_required_info"));
         } else {
             $code->setInfo($lng->txt("registration_code_optional_info"));
         }
         $this->form->addItem($code);
     }
     // user defined fields
     $user_defined_data = $ilUser->getUserDefinedData();
     include_once './Services/User/classes/class.ilUserDefinedFields.php';
     $user_defined_fields =& ilUserDefinedFields::_getInstance();
     $custom_fields = array();
     foreach ($user_defined_fields->getRegistrationDefinitions() as $field_id => $definition) {
         if ($definition['field_type'] == UDF_TYPE_TEXT) {
             $custom_fields["udf_" . $definition['field_id']] = new ilTextInputGUI($definition['field_name'], "udf_" . $definition['field_id']);
             $custom_fields["udf_" . $definition['field_id']]->setValue($user_defined_data["f_" . $field_id]);
             $custom_fields["udf_" . $definition['field_id']]->setMaxLength(255);
             $custom_fields["udf_" . $definition['field_id']]->setSize(40);
         } else {
             if ($definition['field_type'] == UDF_TYPE_WYSIWYG) {
                 $custom_fields["udf_" . $definition['field_id']] = new ilTextAreaInputGUI($definition['field_name'], "udf_" . $definition['field_id']);
                 $custom_fields["udf_" . $definition['field_id']]->setValue($user_defined_data["f_" . $field_id]);
                 $custom_fields["udf_" . $definition['field_id']]->setUseRte(true);
             } else {
                 $custom_fields["udf_" . $definition['field_id']] = new ilSelectInputGUI($definition['field_name'], "udf_" . $definition['field_id']);
                 $custom_fields["udf_" . $definition['field_id']]->setValue($user_defined_data["f_" . $field_id]);
                 $custom_fields["udf_" . $definition['field_id']]->setOptions($user_defined_fields->fieldValuesToSelectArray($definition['field_values']));
             }
         }
         if ($definition['required']) {
             $custom_fields["udf_" . $definition['field_id']]->setRequired(true);
         }
     }
     // standard fields
     include_once "./Services/User/classes/class.ilUserProfile.php";
     $up = new ilUserProfile();
     $up->setMode(ilUserProfile::MODE_REGISTRATION);
     $up->skipGroup("preferences");
     // add fields to form
     $up->addStandardFieldsToForm($this->form, NULL, $custom_fields);
     unset($custom_fields);
     // set language selection to current display language
     $flang = $this->form->getItemByPostVar("usr_language");
     if ($flang) {
         $flang->setValue($lng->getLangKey());
     }
     // add information to role selection (if not hidden)
     if ($this->code_enabled) {
         $role = $this->form->getItemByPostVar("usr_roles");
         if ($role && $role->getType() == "select") {
             $role->setInfo($lng->txt("registration_code_role_info"));
         }
     }
     // #11407
     $domains = array();
     foreach ($this->registration_settings->getAllowedDomains() as $item) {
         if (trim($item)) {
             $domains[] = $item;
         }
     }
     if (sizeof($domains)) {
         $mail_obj = $this->form->getItemByPostVar('usr_email');
         $mail_obj->setInfo(sprintf($lng->txt("reg_email_domains"), implode(", ", $domains)) . "<br />" . ($this->code_enabled ? $lng->txt("reg_email_domains_code") : ""));
     }
     if (ilTermsOfServiceHelper::isEnabled()) {
         try {
             require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceSignableDocumentFactory.php';
             $document = ilTermsOfServiceSignableDocumentFactory::getByLanguageObject($lng);
             $field = new ilFormSectionHeaderGUI();
             $field->setTitle($lng->txt('usr_agreement'));
             $this->form->addItem($field);
             $field = new ilCustomInputGUI();
             $field->setHTML('<div id="agreement">' . $document->getContent() . '</div>');
             $this->form->addItem($field);
             $field = new ilCheckboxInputGUI($lng->txt('accept_usr_agreement'), 'accept_terms_of_service');
             $field->setRequired(true);
             $field->setValue(1);
             $this->form->addItem($field);
         } catch (ilTermsOfServiceNoSignableDocumentFoundException $e) {
         }
     }
     require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
     if (ilCaptchaUtil::isActiveForRegistration()) {
         require_once 'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
         $captcha = new ilCaptchaInputGUI($lng->txt("captcha_code"), 'captcha_code');
         $captcha->setRequired(true);
         $this->form->addItem($captcha);
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilAccountRegistrationGUI.php

示例9: initPartProperties

 /**
  * add the properties of a question part to the form
  *
  * @param object    form object to extend
  * @param object    question part object
  * @param integer    counter of the question part
  */
 private function initPartProperties($form, $part_obj = null, $counter = "1")
 {
     // Use a dummy part object for a new booking definition
     if (!isset($part_obj)) {
         $part_obj = new assAccountingQuestionPart($this->object);
     }
     // Part identifier (is 0 for a new part)
     $item = new ilHiddenInputGUI("parts[]");
     $item->setValue($part_obj->getPartId());
     $form->addItem($item);
     // Title
     $item = new ilFormSectionHeaderGUI();
     $item->setTitle($this->plugin->txt('accounting_table') . ' ' . $counter);
     $form->addItem($item);
     // Position
     $item = new ilNumberInputGUI($this->plugin->txt('position'), 'position_' . $part_obj->getPartId());
     $item->setSize(2);
     $item->setDecimals(1);
     $item->SetInfo($this->plugin->txt('position_info'));
     if ($part_obj->getPartId()) {
         $item->setValue(sprintf("%01.1f", $part_obj->getPosition()));
     }
     $form->addItem($item);
     // Text
     $item = new ilTextAreaInputGUI($this->plugin->txt("question_part"), 'text_' . $part_obj->getPartId());
     $item->setValue($this->object->prepareTextareaOutput($part_obj->getText()));
     $item->setRows(10);
     $item->setCols(80);
     if (!$this->object->getSelfAssessmentEditingMode()) {
         $item->setUseRte(TRUE);
         include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
         $item->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
         $item->addPlugin("latex");
         $item->addButton("latex");
         $item->addButton("pastelatex");
         $item->setRTESupport($this->object->getId(), "qpl", "assessment");
     } else {
         $item->setRteTags(self::getSelfAssessmentTags());
         $item->setUseTagsForRteOnly(false);
     }
     $form->addItem($item);
     // Booking XML definition
     $item = new ilCustomInputGUI($this->plugin->txt('booking_xml'));
     $item->setInfo($this->plugin->txt('booking_xml_info'));
     $tpl = $this->plugin->getTemplate('tpl.il_as_qpl_accqst_edit_xml.html');
     $tpl->setVariable("CONTENT", ilUtil::prepareFormOutput($part_obj->getBookingXML()));
     $tpl->setVariable("NAME", 'booking_xml_' . $part_obj->getPartId());
     $item->setHTML($tpl->get());
     // Booking file
     $subitem = new ilFileInputGUI($this->plugin->txt('booking_file'), "booking_file_" . $part_obj->getPartId());
     $subitem->setSuffixes(array('xml'));
     $item->addSubItem($subitem);
     // Download button
     if (strlen($part_obj->getBookingXML())) {
         $tpl = $this->plugin->getTemplate('tpl.il_as_qpl_accqst_form_custom.html');
         $this->ctrl->setParameter($this, 'xmltype', 'booking');
         $this->ctrl->setParameter($this, 'part_id', $part_obj->getPartId());
         $tpl->setCurrentBlock('button');
         $tpl->setVariable('BUTTON_HREF', $this->ctrl->getLinkTarget($this, 'downloadXml'));
         $tpl->setVariable('BUTTON_TEXT', $this->plugin->txt('download_booking_xml'));
         $tpl->ParseCurrentBlock();
         $subitem = new ilcustomInputGUI('');
         $subitem->setHTML($tpl->get());
         $item->addSubItem($subitem);
     }
     $form->addItem($item);
     // Delete Button
     if ($part_obj->getPartId()) {
         $tpl = $this->plugin->getTemplate('tpl.il_as_qpl_accqst_form_custom.html');
         $tpl->setCurrentBlock('button');
         $this->ctrl->setParameter($this, 'part_id', $part_obj->getPartId());
         $tpl->setVariable('BUTTON_HREF', $this->ctrl->getLinkTarget($this, 'deletePart'));
         $tpl->setVariable('BUTTON_TEXT', $this->plugin->txt('delete_accounting_table'));
         $tpl->ParseCurrentBlock();
         $item = new ilcustomInputGUI();
         $item->setHTML($tpl->get());
         $form->addItem($item);
     }
 }
开发者ID:ilifau,项目名称:assAccountingQuestion,代码行数:86,代码来源:class.assAccountingQuestionGUI.php

示例10: initForm


//.........这里部分代码省略.........
         $dur->setEnd($this->object->getRegistrationEnd());
         $time_limit->addSubItem($dur);
         $this->form->addItem($time_limit);
         // max member
         $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'), 'registration_membership_limited');
         $lim->setValue(1);
         $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
         $lim->setChecked($this->object->isMembershipLimited());
         $max = new ilTextInputGUI('', 'registration_max_members');
         $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
         $max->setTitle($this->lng->txt('members') . ':');
         $max->setSize(3);
         $max->setMaxLength(4);
         $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
         $lim->addSubItem($max);
         $wait = new ilCheckboxInputGUI('', 'waiting_list');
         $wait->setValue(1);
         $wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
         $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
         $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
         $lim->addSubItem($wait);
         $this->form->addItem($lim);
         // Registration codes
         if (!$this->object->getRegistrationAccessCode()) {
             include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
             $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
         }
         $reg_link = new ilHiddenInputGUI('reg_code');
         $reg_link->setValue($this->object->getRegistrationAccessCode());
         $this->form->addItem($reg_link);
         $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
         include_once './Services/Link/classes/class.ilLink.php';
         $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
         $link->setHTML('<font class="small">' . $val . '</font>');
         $reg_code->addSubItem($link);
         $this->form->addItem($reg_code);
         // Group presentation
         $hasParentCourse = $tree->checkForParentType($this->object->getRefId(), 'crs');
         $pres = new ilFormSectionHeaderGUI();
         $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
         $this->form->addItem($pres);
         // presentation type
         $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'), 'view_mode');
         if ($hasParentCourse) {
             switch ($this->object->getViewMode()) {
                 case ilContainer::VIEW_SESSIONS:
                     $course_view_mode = ' (' . $this->lng->txt('cntr_view_sessions') . ')';
                     break;
                 case ilContainer::VIEW_SIMPLE:
                     $course_view_mode = ' (' . $this->lng->txt('cntr_view_simple') . ')';
                     break;
                 case ilContainer::VIEW_BY_TYPE:
                     $course_view_mode = ' (' . $this->lng->txt('cntr_view_by_type') . ')';
                     break;
             }
             $opt = new ilRadioOption($this->lng->txt('grp_view_inherit') . $course_view_mode, ilContainer::VIEW_INHERIT);
             $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
             $view_type->addOption($opt);
         }
         if ($hasParentCourse && $this->object->getViewMode(false) == ilContainer::VIEW_INHERIT) {
             $view_type->setValue(ilContainer::VIEW_INHERIT);
         } else {
             $view_type->setValue($this->object->getViewMode(true));
         }
         $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'), ilContainer::VIEW_SIMPLE);
         $opt->setInfo($this->lng->txt('grp_view_info_simple'));
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:67,代码来源:class.ilObjGroupGUI.php

示例11: initEditForm


//.........这里部分代码省略.........
     $pass->setMaxLength(12);
     $pass->setValue($this->object->getSubscriptionPassword());
     $opt->addSubItem($pass);
     $reg_proc->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_confirmation'), IL_CRS_SUBSCRIPTION_CONFIRMATION);
     $opt->setInfo($this->lng->txt('crs_registration_confirmation_info'));
     $reg_proc->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt('crs_reg_no_selfreg'), IL_CRS_SUBSCRIPTION_DEACTIVATED);
     $opt->setInfo($this->lng->txt('crs_registration_deactivated'));
     $reg_proc->addOption($opt);
     $form->addItem($reg_proc);
     // Registration codes
     $reg_code = new ilCheckboxInputGUI($this->lng->txt('crs_reg_code'), 'reg_code_enabled');
     $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
     $reg_code->setValue(1);
     $reg_code->setInfo($this->lng->txt('crs_reg_code_enabled_info'));
     /*
     $code = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_value'));
     $code->setValue($this->object->getRegistrationAccessCode());
     $reg_code->addSubItem($code);
     */
     #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
     // Create default access code
     if (!$this->object->getRegistrationAccessCode()) {
         include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
         $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
     }
     $reg_link = new ilHiddenInputGUI('reg_code');
     $reg_link->setValue($this->object->getRegistrationAccessCode());
     $form->addItem($reg_link);
     $link = new ilCustomInputGUI($this->lng->txt('crs_reg_code_link'));
     include_once './Services/Link/classes/class.ilLink.php';
     $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
     $link->setHTML('<font class="small">' . $val . '</font>');
     $reg_code->addSubItem($link);
     $form->addItem($reg_code);
     // time limit
     $time_limit = new ilCheckboxInputGUI($this->lng->txt('crs_registration_limited'), 'subscription_limitation_type');
     $time_limit->setChecked($this->object->getSubscriptionLimitationType() == IL_CRS_SUBSCRIPTION_LIMITED ? true : false);
     include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
     $sdur = new ilDateDurationInputGUI($this->lng->txt('crs_registration_period'), "subscription_period");
     $sdur->setShowTime(true);
     $sdur->setStart(new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX));
     $sdur->setStartText($this->lng->txt('crs_start'));
     $sdur->setEnd(new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX));
     $sdur->setEndText($this->lng->txt('crs_end'));
     $time_limit->addSubItem($sdur);
     $form->addItem($time_limit);
     // Max members
     $lim = new ilCheckboxInputGUI($this->lng->txt('crs_subscription_max_members_short'), 'subscription_membership_limitation');
     $lim->setValue(1);
     $lim->setChecked($this->object->isSubscriptionMembershipLimited());
     $max = new ilTextInputGUI('', 'subscription_max');
     $max->setSubmitFormOnEnter(true);
     $max->setSize(4);
     $max->setMaxLength(4);
     $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() : '');
     $max->setTitle($this->lng->txt('crs_subscription_max_members'));
     $max->setInfo($this->lng->txt('crs_reg_max_info'));
     $lim->addSubItem($max);
     $wait = new ilCheckboxInputGUI($this->lng->txt('crs_waiting_list'), 'waiting_list');
     $wait->setChecked($this->object->enabledWaitingList());
     $wait->setInfo($this->lng->txt('crs_wait_info'));
     $lim->addSubItem($wait);
     $form->addItem($lim);
     $pres = new ilFormSectionHeaderGUI();
开发者ID:bheyser,项目名称:qplskl,代码行数:67,代码来源:class.ilObjCourseGUI.php

示例12: initEditForm


//.........这里部分代码省略.........
     $reg_proc->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_password'), IL_CRS_SUBSCRIPTION_PASSWORD);
     $pass = new ilTextInputGUI('', 'subscription_password');
     $pass->setSubmitFormOnEnter(true);
     $pass->setSize(12);
     $pass->setMaxLength(12);
     $pass->setValue($this->object->getSubscriptionPassword());
     $opt->addSubItem($pass);
     $reg_proc->addOption($opt);
     $form->addItem($reg_proc);
     // Registration codes
     $reg_code = new ilCheckboxInputGUI('', 'reg_code_enabled');
     $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
     $reg_code->setValue(1);
     $reg_code->setInfo($this->lng->txt('crs_reg_code_enabled_info'));
     $reg_code->setOptionTitle($this->lng->txt('crs_reg_code'));
     /*
     $code = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_value'));
     $code->setValue($this->object->getRegistrationAccessCode());
     $reg_code->addSubItem($code);
     */
     #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
     // Create default access code
     if (!$this->object->getRegistrationAccessCode()) {
         include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
         $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
     }
     $reg_link = new ilHiddenInputGUI('reg_code');
     $reg_link->setValue($this->object->getRegistrationAccessCode());
     $form->addItem($reg_link);
     $link = new ilCustomInputGUI($this->lng->txt('crs_reg_code_link'));
     include_once './Services/Link/classes/class.ilLink.php';
     $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
     $link->setHTML('<font class="small">' . $val . '</font>');
     $reg_code->addSubItem($link);
     $form->addItem($reg_code);
     // Max members
     $lim = new ilCheckboxInputGUI($this->lng->txt('crs_subscription_max_members_short'), 'subscription_membership_limitation');
     $lim->setValue(1);
     $lim->setOptionTitle($this->lng->txt('crs_subscription_max_members'));
     $lim->setChecked($this->object->isSubscriptionMembershipLimited());
     $max = new ilTextInputGUI('', 'subscription_max');
     $max->setSubmitFormOnEnter(true);
     $max->setSize(4);
     $max->setMaxLength(4);
     $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() : '');
     $max->setTitle($this->lng->txt('members') . ':');
     $max->setInfo($this->lng->txt('crs_reg_max_info'));
     $lim->addSubItem($max);
     $wait = new ilCheckboxInputGUI('', 'waiting_list');
     $wait->setOptionTitle($this->lng->txt('crs_waiting_list'));
     $wait->setChecked($this->object->enabledWaitingList());
     $wait->setInfo($this->lng->txt('crs_wait_info'));
     $lim->addSubItem($wait);
     $form->addItem($lim);
     $not = new ilCheckboxInputGUI($this->lng->txt('crs_auto_notification'), 'auto_notification');
     $not->setValue(1);
     $not->setInfo($this->lng->txt('crs_auto_notification_info'));
     $not->setChecked($this->object->getAutoNotification());
     $form->addItem($not);
     $pres = new ilFormSectionHeaderGUI();
     $pres->setTitle($this->lng->txt('crs_view_mode'));
     $form->addItem($pres);
     // presentation type
     $view_type = new ilRadioGroupInputGUI($this->lng->txt('crs_presentation_type'), 'view_mode');
     $view_type->setValue($this->object->getViewMode());
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:67,代码来源:class.ilObjCourseGUI.php

示例13: getFormElement


//.........这里部分代码省略.........
             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));
开发者ID:bheyser,项目名称:qplskl,代码行数:67,代码来源:class.ilLuceneAdvancedSearchFields.php

示例14: initForm

 /**
  * init create/edit form
  *
  * @access protected
  * @param string edit or create
  * @return
  */
 protected function initForm($a_mode = 'edit')
 {
     global $ilUser, $tpl, $tree;
     if (is_object($this->form)) {
         return true;
     }
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     switch ($a_mode) {
         case 'edit':
             $this->form->setFormAction($this->ctrl->getFormAction($this, 'update'));
             break;
         default:
             $this->form->setTableWidth('600px');
             $this->form->setFormAction($this->ctrl->getFormAction($this, 'save'));
             break;
     }
     // title
     $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $title->setSubmitFormOnEnter(true);
     $title->setValue($this->object->getTitle());
     $title->setSize(min(40, ilObject::TITLE_LENGTH));
     $title->setMaxLength(ilObject::TITLE_LENGTH);
     $title->setRequired(true);
     $this->form->addItem($title);
     // desc
     $desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
     $desc->setValue($this->object->getLongDescription());
     $desc->setRows(2);
     $desc->setCols(40);
     $this->form->addItem($desc);
     // Group type
     $grp_type = new ilRadioGroupInputGUI($this->lng->txt('grp_typ'), 'grp_type');
     if ($a_mode == 'edit') {
         $type = $this->object->getGroupType() ? $this->object->getGroupType() : $this->object->readGroupStatus();
     } else {
         $type = $this->object->getGroupType() ? $this->object->getGroupType() : GRP_TYPE_PUBLIC;
     }
     $grp_type->setValue($type);
     $grp_type->setRequired(true);
     // PUBLIC GROUP
     $opt_public = new ilRadioOption($this->lng->txt('grp_public'), GRP_TYPE_PUBLIC, $this->lng->txt('grp_public_info'));
     $grp_type->addOption($opt_public);
     // CLOSED GROUP
     $opt_closed = new ilRadioOption($this->lng->txt('grp_closed'), GRP_TYPE_CLOSED, $this->lng->txt('grp_closed_info'));
     $grp_type->addOption($opt_closed);
     $this->form->addItem($grp_type);
     if ($a_mode == 'edit') {
         // Group registration ############################################################
         $pres = new ilFormSectionHeaderGUI();
         $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
         $this->form->addItem($pres);
         // Registration type
         $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'), 'registration_type');
         $reg_type->setValue($this->object->getRegistrationType());
         $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'), GRP_REGISTRATION_DIRECT);
         #$this->lng->txt('grp_reg_direct_info'));
         $reg_type->addOption($opt_dir);
         $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'), GRP_REGISTRATION_PASSWORD);
         $pass = new ilTextInputGUI($this->lng->txt("password"), 'password');
         $pass->setInfo($this->lng->txt('grp_reg_password_info'));
         $pass->setValue($this->object->getPassword());
         $pass->setSize(10);
         $pass->setMaxLength(32);
         $opt_pass->addSubItem($pass);
         $reg_type->addOption($opt_pass);
         $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'), GRP_REGISTRATION_REQUEST, $this->lng->txt('grp_reg_request_info'));
         $reg_type->addOption($opt_req);
         $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'), GRP_REGISTRATION_DEACTIVATED, $this->lng->txt('grp_reg_disabled_info'));
         $reg_type->addOption($opt_deact);
         // Registration codes
         $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'), 'reg_code_enabled');
         $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
         $reg_code->setValue(1);
         $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
         $this->form->addItem($reg_type);
         // Registration codes
         if (!$this->object->getRegistrationAccessCode()) {
             include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
             $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
         }
         $reg_link = new ilHiddenInputGUI('reg_code');
         $reg_link->setValue($this->object->getRegistrationAccessCode());
         $this->form->addItem($reg_link);
         $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
         include_once './Services/Link/classes/class.ilLink.php';
         $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
         $link->setHTML('<font class="small">' . $val . '</font>');
         $reg_code->addSubItem($link);
         $this->form->addItem($reg_code);
         // time limit
         $time_limit = new ilCheckboxInputGUI($this->lng->txt('grp_reg_limited'), 'reg_limit_time');
         //			$time_limit->setOptionTitle($this->lng->txt('grp_reg_limit_time'));
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilObjGroupGUI.php

示例15: initAddCodesForm

 function initAddCodesForm()
 {
     global $rbacreview, $ilObjDataCache, $lng;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'createCodes'));
     $this->form_gui->setTitle($this->lng->txt('registration_codes_edit_header'));
     $count = new ilNumberInputGUI($this->lng->txt('registration_codes_number'), 'reg_codes_number');
     $count->setSize(4);
     $count->setMaxLength(4);
     $count->setMinValue(1);
     $count->setMaxValue(1000);
     $count->setRequired(true);
     $this->form_gui->addItem($count);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('registration_codes_roles_title'));
     $this->form_gui->addItem($sec);
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $options = array("" => $this->lng->txt('registration_codes_no_assigned_role'));
     foreach ($rbacreview->getGlobalRoles() as $role_id) {
         if (!in_array($role_id, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID))) {
             $options[$role_id] = $ilObjDataCache->lookupTitle($role_id);
         }
     }
     $roles = new ilSelectInputGUI($this->lng->txt("registration_codes_roles"), "reg_codes_role");
     $roles->setInfo($this->lng->txt("registration_codes_override_info"));
     $roles->setOptions($options);
     $this->form_gui->addItem($roles);
     $local = new ilTextInputGUI($this->lng->txt("registration_codes_roles_local"), "reg_codes_local");
     $local->setMulti(true);
     $local->setDataSource($this->ctrl->getLinkTarget($this, "getLocalRoleAutoComplete", "", true));
     $this->form_gui->addItem($local);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('reg_access_limitations'));
     $this->form_gui->addItem($sec);
     $limit = new ilRadioGroupInputGUI($this->lng->txt("reg_access_limitation_mode"), "reg_limit");
     $limit->setInfo($this->lng->txt("registration_codes_override_info"));
     $this->form_gui->addItem($limit);
     $opt = new ilRadioOption($this->lng->txt("registration_codes_roles_limitation_none"), "none");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_none"), "unlimited");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_absolute"), "absolute");
     $limit->addOption($opt);
     $dt = new ilDateTimeInputGUI($this->lng->txt("reg_access_limitation_mode_absolute_target"), "abs_date");
     $dt->setRequired(true);
     $opt->addSubItem($dt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_relative"), "relative");
     $limit->addOption($opt);
     $days = new ilTextInputGUI("", "rel_date[d]");
     $days->setSize(5);
     $days->setSuffix($this->lng->txt("days"));
     $mon = new ilTextInputGUI("", "rel_date[m]");
     $mon->setSize(5);
     $mon->setSuffix($this->lng->txt("months"));
     $yr = new ilTextInputGUI("", "rel_date[y]");
     $yr->setSize(5);
     $yr->setSuffix($this->lng->txt("years"));
     // custom input won't reload
     if (is_array($_POST["rel_date"])) {
         $days->setValue($_POST["rel_date"]["d"]);
         $mon->setValue($_POST["rel_date"]["m"]);
         $yr->setValue($_POST["rel_date"]["y"]);
     }
     $dur = new ilCustomInputGUI($this->lng->txt("reg_access_limitation_mode_relative_target"));
     $dur->setRequired(true);
     $dur->setHTML($days->getToolbarHTML() . " " . $mon->getToolbarHTML() . " " . $yr->getToolbarHTML());
     $opt->addSubItem($dur);
     $this->form_gui->addCommandButton('createCodes', $this->lng->txt('create'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:70,代码来源:class.ilRegistrationSettingsGUI.php


注:本文中的ilCustomInputGUI::setHTML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。