• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilSelectInputGUI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addToForm

 public function addToForm()
 {
     global $lng;
     $def = $this->getADT()->getCopyOfDefinition();
     $selection = $this->getADT()->getSelection();
     $options = $def->getOptions();
     asort($options);
     // ?
     if (!$this->isRequired()) {
         $options = array("" => "-") + $options;
     } else {
         if ($this->getADT()->isNull()) {
             $options = array("" => $lng->txt("please_select")) + $options;
         }
     }
     if (!(bool) $this->force_radio) {
         $select = new ilSelectInputGUI($this->getTitle(), $this->getElementId());
         $select->setOptions($options);
     } else {
         $select = new ilRadioGroupInputGUI($this->getTitle(), $this->getElementId());
         foreach ($options as $value => $caption) {
             $option = new ilRadioOption($caption, $value);
             if (is_array($this->option_infos) && array_key_exists($value, $this->option_infos)) {
                 $option->setInfo($this->option_infos[$value]);
             }
             $select->addOption($option);
         }
     }
     $this->addBasicFieldProperties($select, $def);
     $select->setValue($selection);
     $this->addToParentElement($select);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilADTEnumFormBridge.php


示例2: initFilter

 /**
  * Init Filter
  */
 function initFilter()
 {
     global $lng, $ilUser;
     // period
     $per = $_SESSION["news_pd_news_per"] != "" ? $_SESSION["news_pd_news_per"] : ilNewsItem::_lookupUserPDPeriod($ilUser->getId());
     $news_set = new ilSetting("news");
     $allow_shorter_periods = $news_set->get("allow_shorter_periods");
     $allow_longer_periods = $news_set->get("allow_longer_periods");
     $default_per = ilNewsItem::_lookupDefaultPDPeriod();
     $options = array(2 => sprintf($lng->txt("news_period_x_days"), 2), 3 => sprintf($lng->txt("news_period_x_days"), 3), 5 => sprintf($lng->txt("news_period_x_days"), 5), 7 => $lng->txt("news_period_1_week"), 14 => sprintf($lng->txt("news_period_x_weeks"), 2), 30 => $lng->txt("news_period_1_month"), 60 => sprintf($lng->txt("news_period_x_months"), 2), 120 => sprintf($lng->txt("news_period_x_months"), 4), 180 => sprintf($lng->txt("news_period_x_months"), 6), 366 => $lng->txt("news_period_1_year"));
     $unset = array();
     foreach ($options as $k => $opt) {
         if (!$allow_shorter_periods && $k < $default_per) {
             $unset[$k] = $k;
         }
         if (!$allow_longer_periods && $k > $default_per) {
             $unset[$k] = $k;
         }
     }
     foreach ($unset as $k) {
         unset($options[$k]);
     }
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $si = new ilSelectInputGUI($this->lng->txt("news_time_period"), "news_per");
     $si->setOptions($options);
     $si->setValue($per);
     $this->addFilterItem($si);
     // related to...
     $si = new ilSelectInputGUI($this->lng->txt("context"), "news_ref_id");
     $si->setOptions($this->contexts);
     $si->setValue($this->selected_context);
     $this->addFilterItem($si);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:36,代码来源:class.ilPDNewsTableGUI.php


示例3: listFields

 /**
  * list fields
  */
 public function listFields()
 {
     global $tpl, $lng, $ilCtrl, $ilToolbar;
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     $tables = $this->parent_obj->object->getTables();
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     $table_selection = new ilSelectInputGUI('', 'table_id');
     $table_selection->setOptions($options);
     $table_selection->setValue($this->table_id);
     $ilToolbar->setFormAction($ilCtrl->getFormActionByClass("ilDataCollectionFieldListGUI", "doTableSwitch"));
     $ilToolbar->addText($lng->txt("dcl_table"));
     $ilToolbar->addInputItem($table_selection);
     $ilToolbar->addFormButton($lng->txt('change'), 'doTableSwitch');
     $ilToolbar->addSeparator();
     $ilToolbar->addButton($lng->txt("dcl_add_new_table"), $ilCtrl->getLinkTargetByClass("ildatacollectiontableeditgui", "create"));
     $ilToolbar->addSeparator();
     $ilCtrl->setParameterByClass("ildatacollectiontableeditgui", "table_id", $this->table_id);
     $ilToolbar->addButton($lng->txt("dcl_table_settings"), $ilCtrl->getLinkTargetByClass("ildatacollectiontableeditgui", "edit"));
     $ilToolbar->addButton($lng->txt("dcl_delete_table"), $ilCtrl->getLinkTargetByClass("ildatacollectiontableeditgui", "confirmDelete"));
     $ilToolbar->addButton($lng->txt("dcl_add_new_field"), $ilCtrl->getLinkTargetByClass("ildatacollectionfieldeditgui", "create"));
     // requested not to implement this way...
     //        $tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     require_once './Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php';
     $list = new ilDataCollectionFieldListTableGUI($this, $ilCtrl->getCmd(), $this->table_id);
     $tpl->setContent($list->getHTML());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:33,代码来源:class.ilDataCollectionFieldListGUI.php


示例4: getDeveloperRubricCardFormCommandRow

 private function getDeveloperRubricCardFormCommandRow($form_action)
 {
     global $ilUser;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     //configure the command row
     $rubric_commandrow_tpl = new ilTemplate('tpl.lp_rubricform_commandrow.html', true, true, 'Services/Tracking');
     $select_prop = new ilSelectInputGUI('Title', 'selected_cmdrubric');
     $options = array('behavior_1' => $this->lng->txt('rubric_option_behavior_1'), 'behavior_2' => $this->lng->txt('rubric_option_behavior_2'), 'behavior_3' => $this->lng->txt('rubric_option_behavior_3'), 'behavior_4' => $this->lng->txt('rubric_option_behavior_4'), 'behavior_5' => $this->lng->txt('rubric_option_behavior_5'), 'add_group' => $this->lng->txt('rubric_option_add_group'), 'del_group' => $this->lng->txt('rubric_option_del_group'), 'add_criteria' => $this->lng->txt('rubric_option_add_criteria'), 'del_criteria' => $this->lng->txt('rubric_option_del_criteria'));
     $select_prop->setOptions($options);
     $rubric_commandrow_tpl->setVariable('RURBRIC_COMMANDROW_SELECT', $select_prop->render());
     $rubric_commandrow_tpl->setVariable('RUBRIC_SAVE', $this->lng->txt('save'));
     $rubric_commandrow_tpl->setVariable('RUBRIC_EXECUTE', $this->lng->txt('execute'));
     $rubric_commandrow_tpl->setVariable('FORM_ACTION', $form_action);
     $rubric_commandrow_tpl->setVariable('PASSING_GRADE_VALUE', "{$this->passing_grade}");
     if (!is_null($this->rubric_locked)) {
         $rubric_commandrow_tpl->setVariable('RUBRIC_DISABLED', 'disabled');
         $rubric_commandrow_tpl->setVariable('RUBRIC_LOCK', $this->lng->txt('rubric_card_unlock'));
         $tmp_user = ilObjectFactory::getInstanceByObjId($this->rubric_owner, false);
         if ($this->rubric_owner !== $ilUser->getId()) {
             $rubric_commandrow_tpl->setVariable('USER_LOCK', 'disabled');
         }
         ilUtil::sendInfo($this->lng->txt('rubric_locked_info') . ' ' . $tmp_user->getFullName() . ' ' . $this->rubric_locked);
     } else {
         $rubric_commandrow_tpl->setVariable('RUBRIC_LOCK', $this->lng->txt('rubric_card_lock'));
     }
     $rubric_commandrow_tpl->setVariable('EXPORT', $this->lng->txt('rubric_option_export_pdf'));
     return $rubric_commandrow_tpl;
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:28,代码来源:class.ilLPRubricCardGUI.php


示例5: editSettings

 /**
  * Edit news settings.
  */
 public function editSettings()
 {
     global $ilCtrl, $lng, $ilSetting, $ilTabs, $ilToolbar;
     $ilTabs->activateTab("settings");
     if (OH_REF_ID > 0) {
         ilUtil::sendInfo("This installation is used for online help authoring. Help modules cannot be imported.");
         return;
     }
     if ($this->checkPermissionBool("write")) {
         // help file
         include_once "./Services/Form/classes/class.ilFileInputGUI.php";
         $fi = new ilFileInputGUI($lng->txt("help_help_file"), "help_file");
         $fi->setSuffixes(array("zip"));
         $ilToolbar->addInputItem($fi, true);
         $ilToolbar->addFormButton($lng->txt("upload"), "uploadHelpFile");
         $ilToolbar->addSeparator();
         // help mode
         include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
         $options = array("" => $lng->txt("help_tooltips_and_help"), "1" => $lng->txt("help_help_only"), "2" => $lng->txt("help_tooltips_only"));
         $si = new ilSelectInputGUI($this->lng->txt("help_mode"), "help_mode");
         $si->setOptions($options);
         $si->setValue($ilSetting->get("help_mode"));
         $ilToolbar->addInputItem($si);
         $ilToolbar->addFormButton($lng->txt("help_set_mode"), "setMode");
     }
     $ilToolbar->setFormAction($ilCtrl->getFormAction($this), true);
     include_once "./Services/Help/classes/class.ilHelpModuleTableGUI.php";
     $tab = new ilHelpModuleTableGUI($this, "editSettings");
     $this->tpl->setContent($tab->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilObjHelpSettingsGUI.php


示例6: initForm

 protected function initForm()
 {
     $this->setTitle($this->pl->txt('form_title'));
     $te = new ilSelectInputGUI($this->txt(self::F_UDF_FIELD_ID), self::F_UDF_FIELD_ID);
     $te->setDisabled(!$this->is_new);
     $te->setRequired(true);
     $te->setOptions(ilUDFCheck::getDefinitionData());
     $this->addItem($te);
     if (!$this->is_new) {
         $te = new ilHiddenInputGUI($this->txt(self::F_UDF_FIELD_ID), self::F_UDF_FIELD_ID);
         $this->addItem($te);
         switch (ilUDFCheck::getDefinitionTypeForId($this->object->getUdfFieldId())) {
             case ilUDFCheck::TYPE_TEXT:
                 $se = new ilTextInputGUI($this->pl->txt(self::F_CHECK_VALUE), self::F_CHECK_VALUE);
                 $this->addItem($se);
                 break;
             case ilUDFCheck::TYPE_SELECT:
                 $se = new ilSelectInputGUI($this->pl->txt(self::F_CHECK_VALUE), self::F_CHECK_VALUE);
                 $se->setOptions(ilUDFCheck::getDefinitionValuesForId($this->object->getUdfFieldId()));
                 $this->addItem($se);
                 break;
         }
     }
     $this->addCommandButtons();
 }
开发者ID:JKN-INC,项目名称:UserDefaults,代码行数:25,代码来源:class.ilUDFCheckFormGUI.php


示例7: parse

 public function parse($scoSelected, $report, $reports)
 {
     global $ilCtrl, $lng;
     $lng->loadLanguageModule("scormtrac");
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($ilCtrl->getFormAction($this->parent_obj));
     $options = array("all" => $lng->txt("all"));
     $scos = $this->parent_obj->object->getTrackedItems();
     foreach ($scos as $row) {
         $options[$row->getId()] = $row->getTitle();
     }
     $si = new ilSelectInputGUI($lng->txt("chapter"), "scoSelected");
     $si->setOptions($options);
     $si->setValue($scoSelected);
     $this->form->addItem($si);
     $options = array("choose" => $lng->txt("please_choose"));
     for ($i = 0; $i < count($reports); $i++) {
         $options[$reports[$i]] = $lng->txt(strtolower($reports[$i]));
     }
     $si = new ilSelectInputGUI($lng->txt("report"), "report");
     $si->setOptions($options);
     $si->setValue($report);
     $this->form->addItem($si);
     $this->form->addCommandButton($this->parent_cmd, $lng->txt("apply_filter"));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilSCORMTrackingItemsPerScoFilterGUI.php


示例8: getToolbar

 /**
  * Get toolbar
  *
  * @return object toolbar
  */
 function getToolbar()
 {
     global $ilCtrl, $lng, $tpl;
     // toolbar
     $tb = new ilToolbarGUI();
     $tb->setFormAction($ilCtrl->getFormAction($this));
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $options = array("WholePicture" => $lng->txt("cont_WholePicture"), "Rect" => $lng->txt("cont_Rect"), "Circle" => $lng->txt("cont_Circle"), "Poly" => $lng->txt("cont_Poly"));
     $si = new ilSelectInputGUI($lng->txt("cont_shape"), "shape");
     $si->setOptions($options);
     $tb->addInputItem($si, true);
     $tb->addFormButton($lng->txt("cont_add_area"), "addNewArea");
     // highlight mode
     /*		if (strtolower(get_class($this)) == "ilimagemapeditorgui")
     		{
     			$st_item = $this->media_object->getMediaItem("Standard");
     			$tb->addSeparator();
     			$options = ilMapArea::getAllHighlightModes();
     			$hl = new ilSelectInputGUI($lng->txt("cont_highlight_mode"), "highlight_mode");
     			$hl->setOptions($options);
     //			$hl->setValue($st_item->getHighlightMode());
     			$tb->addInputItem($hl, true);
     			$options = ilMapArea::getAllHighlightClasses();
     			$hc = new ilSelectInputGUI($lng->txt("cont_highlight_class"), "highlight_class");
     			$hc->setOptions($options);
     //			$hc->setValue($st_item->getHighlightClass());
     			$tb->addInputItem($hc, false);
     			$tb->addFormButton($lng->txt("cont_set"), "setHighlight");
     		}*/
     return $tb;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:36,代码来源:class.ilImageMapEditorGUI.php


示例9: listTemplates

 /**
  * List templates
  */
 function listTemplates()
 {
     // list pages
     include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
     $pages = ilWikiPage::getAllPages($this->wiki->getId());
     $options = array("" => $this->lng->txt("please_select"));
     foreach ($pages as $p) {
         //if (!in_array($p["id"], $ipages_ids))
         //{
         $options[$p["id"]] = ilUtil::shortenText($p["title"], 60, true);
         //}
     }
     $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
     $this->toolbar->setOpenFormTag(true);
     $this->toolbar->setCloseFormTag(false);
     if (count($options) > 0) {
         include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
         $si = new ilSelectInputGUI($this->lng->txt("wiki_pages"), "templ_page_id");
         $si->setOptions($options);
         $this->toolbar->addInputItem($si);
         $this->toolbar->addFormButton($this->lng->txt("wiki_add_template"), "add");
         $this->toolbar->addSeparator();
     }
     // empty page as template?
     include_once "./Services/Form/classes/class.ilCheckboxInputGUI.php";
     $cb = new ilCheckboxInputGUI($this->lng->txt("wiki_empty_page_template"), "empty_page_templ");
     $cb->setChecked($this->wiki->getEmptyPageTemplate());
     $this->toolbar->addInputItem($cb, true);
     $this->toolbar->addFormButton($this->lng->txt("save"), "saveTemplateSettings");
     include_once "./Modules/Wiki/classes/class.ilWikiPageTemplatesTableGUI.php";
     $tab = new ilWikiPageTemplatesTableGUI($this, "listTemplates", $this->wiki->getId());
     $tab->setOpenFormTag(false);
     $tab->setCloseFormTag(true);
     $this->tpl->setContent($tab->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:38,代码来源:class.ilWikiPageTemplateGUI.php


示例10: initForm

 /**
  * Add all fields to the form
  */
 protected function initForm()
 {
     $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
     $this->setTitle($this->lng->txt('orgu_settings'));
     $item = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $item->setRequired(true);
     $item->setValue($this->obj_orgu->getTitle());
     $this->addItem($item);
     $item = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
     $item->setValue($this->obj_orgu->getDescription());
     $this->addItem($item);
     $item = new ilFormSectionHeaderGUI();
     $item->setTitle($this->lng->txt('orgu_type'));
     $this->addItem($item);
     $types = ilOrgUnitType::getAllTypes();
     $options = array(0 => '');
     /** @var ilOrgUnitType $type */
     foreach ($types as $type) {
         $options[$type->getId()] = $type->getTitle();
     }
     asort($options);
     $item = new ilSelectInputGUI($this->lng->txt('orgu_type'), 'orgu_type');
     $item->setOptions($options);
     $item->setValue($this->obj_orgu->getOrgUnitTypeId());
     $this->addItem($item);
     $item = new ilFormSectionHeaderGUI();
     $item->setTitle($this->lng->txt('ext_id'));
     $this->addItem($item);
     $item = new ilTextInputGUI($this->lng->txt('ext_id'), 'ext_id');
     $item->setValue($this->obj_orgu->getImportId());
     $this->addItem($item);
     $this->addCommandButton('updateSettings', $this->lng->txt('save'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:36,代码来源:class.ilObjOrgUnitSettingsFormGUI.php


示例11: populateNewQuestionSelectionRuleInputs

 private function populateNewQuestionSelectionRuleInputs()
 {
     $availablePools = $this->questionSetConfig->getSelectableQuestionPools();
     require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
     $poolSelection = new ilSelectInputGUI(null, 'quest_pool_id');
     $poolSelection->setOptions($this->buildSourcePoolSelectOptionsArray($availablePools));
     $this->addInputItem($poolSelection, true);
     $this->addFormButton($this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'), ilTestRandomQuestionSetConfigGUI::CMD_SHOW_CREATE_SRC_POOL_DEF_FORM);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php


示例12: build

 public function build()
 {
     $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
     $select = new ilSelectInputGUI($this->lng->txt("tst_analysis"), self::SKILL_PROFILE_PARAM);
     $select->setOptions($this->buildEvaluationModeOptionsArray());
     $select->setValue($this->getSelectedEvaluationMode());
     $this->addInputItem($select, true);
     $this->addFormButton($this->lng->txt("select"), $this->parentCMD);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilTestSkillEvaluationToolbarGUI.php


示例13: viewToolbar

 protected function viewToolbar($a_is_initial = false)
 {
     global $ilToolbar, $lng, $ilCtrl;
     $current_figure = (int) $_POST["fig"];
     $current_time_frame = (string) $_POST["tfr"];
     $current_scope = (int) $_POST["scp"];
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $view = new ilSelectInputGUI($lng->txt("wiki_stat_figure"), "fig");
     $view->setOptions($this->page_id ? ilWikiStat::getFigureOptionsPage() : ilWikiStat::getFigureOptions());
     if ($current_figure) {
         $view->setValue($current_figure);
     } else {
         if ($a_is_initial) {
             // default
             $current_figure = $this->page_id ? ilWikiStat::KEY_FIGURE_WIKI_PAGE_CHANGES : ilWikiStat::KEY_FIGURE_WIKI_NUM_PAGES;
         }
     }
     $ilToolbar->addInputItem($view, true);
     $options = array();
     include_once "Services/Calendar/classes/class.ilCalendarUtil.php";
     $lng->loadLanguageModule("dateplaner");
     foreach (ilWikiStat::getAvailableMonths($this->wiki_id) as $month) {
         $parts = explode("-", $month);
         $options[$month] = ilCalendarUtil::_numericMonthToString((int) $parts[1]) . " " . $parts[0];
     }
     krsort($options);
     $tframe = new ilSelectInputGUI($lng->txt("month"), "tfr");
     $tframe->setOptions($options);
     if ($current_time_frame) {
         $tframe->setValue($current_time_frame);
     } else {
         if ($a_is_initial) {
             $current_time_frame = array_shift(array_keys($options));
             // default
         }
     }
     $ilToolbar->addInputItem($tframe, true);
     $scope = new ilSelectInputGUI($lng->txt("wiki_stat_scope"), "scp");
     $scope->setOptions(array(1 => "1 " . $lng->txt("month"), 2 => "2 " . $lng->txt("months"), 3 => "3 " . $lng->txt("months"), 4 => "4 " . $lng->txt("months"), 5 => "5 " . $lng->txt("months"), 6 => "6 " . $lng->txt("months")));
     if ($current_scope) {
         $scope->setValue($current_scope);
     } else {
         if ($a_is_initial) {
             $current_scope = 1;
             // default
         }
     }
     $ilToolbar->addInputItem($scope, true);
     $ilToolbar->setFormAction($ilCtrl->getFormAction($this, "view"));
     $ilToolbar->addFormButton($lng->txt("show"), "view");
     if ($current_figure && $current_time_frame && $current_scope) {
         $ilToolbar->addSeparator();
         $ilToolbar->addFormButton($lng->txt("export"), "export");
         return array("figure" => $current_figure, "month" => $current_time_frame, "scope" => $current_scope);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:56,代码来源:class.ilWikiStatGUI.php


示例14: build

 public function build()
 {
     $availablePools = $this->testOBJ->getAvailableQuestionpools(true, $this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired(), false, true, true);
     require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
     $poolSelection = new ilSelectInputGUI(null, 'quest_pool_id');
     $poolSelection->setOptions($this->buildSourcePoolSelectOptionsArray($availablePools));
     $this->addInputItem($poolSelection, true);
     $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
     $this->addFormButton($this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'), ilTestRandomQuestionSetConfigGUI::CMD_SHOW_CREATE_SRC_POOL_DEF_FORM);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:10,代码来源:class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php


示例15: getToolbar

 /**
  * Get toolbar
  *
  * @return object toolbar
  */
 function getToolbar()
 {
     global $ilCtrl, $lng;
     // toolbar
     $tb = new ilToolbarGUI();
     $tb->setFormAction($ilCtrl->getFormAction($this));
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $options = array("Rect" => $lng->txt("cont_Rect"), "Circle" => $lng->txt("cont_Circle"), "Poly" => $lng->txt("cont_Poly"), "Marker" => $lng->txt("cont_marker"));
     $si = new ilSelectInputGUI($lng->txt("cont_trigger_area"), "shape");
     $si->setOptions($options);
     $tb->addInputItem($si, true);
     $tb->addFormButton($lng->txt("add"), "addNewArea");
     return $tb;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:19,代码来源:class.ilPCIIMTriggerEditorGUI.php


示例16: addToForm

 public function addToForm()
 {
     global $lng;
     $def = $this->getADT()->getCopyOfDefinition();
     $options = $def->getOptions();
     asort($options);
     // ?
     $lng->loadLanguageModule("search");
     $options = array("" => $lng->txt("search_any")) + $options;
     $select = new ilSelectInputGUI($this->getTitle(), $this->getElementId());
     $select->setOptions($options);
     $select->setValue($this->getADT()->getSelection());
     $this->addToParentElement($select);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:14,代码来源:class.ilADTEnumSearchBridgeSingle.php


示例17: showPersonalData

 function showPersonalData()
 {
     // user_id $this->user_obj->getId()
     // all
     $this->psc_obj = new ilPaymentShoppingCart($this->user_obj);
     if (!count($items = $this->psc_obj->getEntries($this->pm_id))) {
         $this->tpl->setVariable("HEADER", $this->lng->txt('pay_bmf_your_order'));
         $this->tpl->touchBlock("stop_floating");
         ilUtil::sendInfo($this->lng->txt('pay_shopping_cart_empty'));
     } else {
         $this->tpl->setVariable("HEADER", $this->lng->txt('pay_step1'));
         $this->tpl->setVariable("TITLE", $this->lng->txt('pay_bmf_personal_data'));
         $this->tpl->setVariable("DESCRIPTION", $this->lng->txt('pay_bmf_description_personal_data'));
         $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
         $oForm = new ilPropertyFormGUI();
         $oForm->setFormAction($this->ctrl->getFormAction($this, 'getPersonalData'));
         $oForm->setTitle($this->lng->txt('pay_bmf_personal_data'));
         $oFirstname = new ilNonEditableValueGUI($this->lng->txt('firstname'));
         $oFirstname->setValue($this->user_obj->getFirstname());
         $oForm->addItem($oFirstname);
         $oLastname = new ilNonEditableValueGUI($this->lng->txt('lastname'));
         $oLastname->setValue($this->user_obj->getLastname());
         $oForm->addItem($oLastname);
         $oStreet = new ilTextInputGUI($this->lng->txt('street'), 'street');
         $oStreet->setValue($this->error != '' && isset($_POST['street']) ? ilUtil::prepareFormOutput($_POST['street'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['street'], true));
         $oForm->addItem($oStreet);
         $oHouseNumber = new ilTextInputGUI($this->lng->txt('pay_bmf_house_number'), 'house_number');
         $oHouseNumber->setValue($this->error != '' && isset($_POST['house_number']) ? ilUtil::prepareFormOutput($_POST['house_number'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['house_number'], true));
         $oForm->addItem($oHouseNumber);
         $oPoBox = new ilTextInputGUI($this->lng->txt('pay_bmf_or') . '  ' . $this->lng->txt('pay_bmf_po_box'), 'po_box');
         $oPoBox->setValue($this->error != '' && isset($_POST['po_box']) ? ilUtil::prepareFormOutput($_POST['po_box'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['po_box'], true));
         $oForm->addItem($oPoBox);
         $oZipCode = new ilTextInputGUI($this->lng->txt('zipcode'), 'zipcode');
         $oZipCode->setValue($this->error != '' && isset($_POST['zipcode']) ? ilUtil::prepareFormOutput($_POST['zipcode'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['zipcode'], true));
         $oForm->addItem($oZipCode);
         $oCity = new ilTextInputGUI($this->lng->txt('city'), 'city');
         $oCity->setValue($this->error != '' && isset($_POST['city']) ? ilUtil::prepareFormOutput($_POST['city'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['city'], true));
         $oForm->addItem($oCity);
         $oCountry = new ilSelectInputGUI($this->lng->txt('country'), 'country');
         $oCountry->setOptions($this->__getCountries());
         $oCountry->setValue($this->error != '' && isset($_POST['country']) ? $_POST['country'] : $_SESSION['bmf']['personal_data']['country']);
         $oForm->addItem($oCountry);
         $oEmail = new ilNonEditableValueGUI($this->lng->txt('email'));
         $oEmail->setValue($this->user_obj->getEmail());
         $oForm->addItem($oEmail);
         $oForm->addcommandButton('getPersonalData', ucfirst($this->lng->txt('next')));
         $this->tpl->setVariable('FORM', $oForm->getHTML());
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:49,代码来源:class.ilPurchaseBMFGUI.php


示例18: addFormProperties

 /**
  * add the configuration elements to a property form
  * @param object	property form
  */
 public function addFormProperties(ilPropertyFormGUI $a_form)
 {
     global $lng;
     $lng->loadLanguageModule('adve');
     $availability = new ilRadioGroupInputGUI($lng->txt('char_selector'), 'char_selector_availability');
     $inactive = new ilRadioOption($lng->txt('char_selector_inactive'), ilCharSelectorConfig::INACTIVE);
     $inactive->setInfo($lng->txt('char_selector_inactive_info_' . $this->config->getContext()));
     $inherit = new ilRadioOption($lng->txt('char_selector_inherit'), ilCharSelectorConfig::INHERIT);
     $inherit->setInfo($lng->txt('char_selector_inherit_info_' . $this->config->getContext()));
     $enabled = new ilRadioOption($lng->txt('char_selector_enabled'), ilCharSelectorConfig::ENABLED);
     $enabled->setInfo($lng->txt('char_selector_enabled_info_' . $this->config->getContext()));
     $disabled = new ilRadioOption($lng->txt('char_selector_disabled'), ilCharSelectorConfig::DISABLED);
     $disabled->setInfo($lng->txt('char_selector_disabled_info_' . $this->config->getContext()));
     $blocks = new ilSelectInputGUI($lng->txt('char_selector_blocks'), 'char_selector_blocks');
     $blocks->setInfo($lng->txt('char_selector_blocks_info'));
     $blocks->setOptions($this->config->getBlockOptions());
     $blocks->setMulti(true);
     $enabled->addSubItem($blocks);
     $custom_items = new ilTextAreaInputGUI($lng->txt('char_selector_custom_items'), 'char_selector_custom_items');
     $tpl = new ilTemplate("tpl.char_selector_custom_info.html", true, true, "Services/UIComponent/CharSelector");
     $tpl->setVariable('1', $lng->txt('char_selector_custom_items_info1'));
     $tpl->setVariable('2a', $lng->txt('char_selector_custom_items_info2a'));
     $tpl->setVariable('2b', $lng->txt('char_selector_custom_items_info2b'));
     $tpl->setVariable('3a', $lng->txt('char_selector_custom_items_info3a'));
     $tpl->setVariable('3b', $lng->txt('char_selector_custom_items_info3b'));
     $tpl->setVariable('4a', $lng->txt('char_selector_custom_items_info4a'));
     $tpl->setVariable('4b', $lng->txt('char_selector_custom_items_info4b'));
     $tpl->setVariable('5a', $lng->txt('char_selector_custom_items_info5a'));
     $tpl->setVariable('5b', $lng->txt('char_selector_custom_items_info5b'));
     $tpl->setVariable('6a', $lng->txt('char_selector_custom_items_info6a'));
     $tpl->setVariable('6b', $lng->txt('char_selector_custom_items_info6b'));
     $custom_items->setInfo($tpl->get());
     $enabled->addSubItem($custom_items);
     switch ($this->config->getContext()) {
         case ilCharSelectorConfig::CONTEXT_ADMIN:
             $availability->addOption($inactive);
             $availability->addOption($enabled);
             $availability->addOption($disabled);
             $a_form->addItem($availability);
             break;
         case ilCharSelectorConfig::CONTEXT_USER:
         case ilCharSelectorConfig::CONTEXT_TEST:
             $availability->addOption($inherit);
             $availability->addOption($enabled);
             $availability->addOption($disabled);
             $a_form->addItem($availability);
             break;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:53,代码来源:class.ilCharSelectorGUI.php


示例19: listRecords

 /**
  * List Records
  *
  *
  */
 public function listRecords()
 {
     global $ilTabs, $tpl, $lng, $ilCtrl, $ilToolbar;
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     if (ilObjDataCollection::_hasWriteAccess($this->parent_obj->ref_id)) {
         $tables = $this->parent_obj->object->getTables();
     } else {
         $tables = $this->parent_obj->object->getVisibleTables();
     }
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     $tpl->addCss("./Modules/DataCollection/css/dcl_reference_hover.css");
     if (count($options) > 0) {
         include_once './Services/Form/classes/class.ilSelectInputGUI.php';
         $table_selection = new ilSelectInputGUI('', 'table_id');
         $table_selection->setOptions($options);
         $table_selection->setValue($this->table_id);
         $ilToolbar->setFormAction($ilCtrl->getFormActionByClass("ilDataCollectionRecordListGUI", "doTableSwitch"));
         $ilToolbar->addText($lng->txt("dcl_table"));
         $ilToolbar->addInputItem($table_selection);
         $ilToolbar->addFormButton($lng->txt('change'), 'doTableSwitch');
         $ilToolbar->addSeparator();
     }
     if (($this->table_obj->getExportEnabled() || $this->table_obj->hasPermissionToFields($this->parent_obj->ref_id)) && count($this->table_obj->getExportableFields())) {
         $ilToolbar->addButton($lng->txt('dcl_export_table_excel'), $ilCtrl->getFormActionByClass("ildatacollectionrecordlistgui", "exportExcel"));
     }
     if ($this->table_obj->hasPermissionToAddRecord($this->parent_obj->ref_id) && $this->table_obj->hasCustomFields()) {
         $ilCtrl->setParameterByClass("ildatacollectionrecordeditgui", "record_id", null);
         $ilToolbar->addButton($lng->txt("dcl_import_records .xls"), $ilCtrl->getFormActionByClass("ildatacollectionrecordlistgui", "showImportExcel"));
         $ilToolbar->addButton($lng->txt("dcl_add_new_record"), $ilCtrl->getFormActionByClass("ildatacollectionrecordeditgui", "create"), "", "", "", "", "submit emphsubmit");
         // #11502
     }
     // requested not to implement this way...
     //$tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     $tpl->addJavaScript("Modules/DataCollection/js/datacollection.js");
     if (count($this->table_obj->getRecordFields()) == 0) {
         ilUtil::sendInfo($lng->txt("dcl_no_fields_yet") . " " . ($this->table_obj->hasPermissionToFields($this->parent_obj->ref_id) ? $lng->txt("dcl_create_fields") : ""));
     }
     $list = new ilDataCollectionRecordListTableGUI($this, $ilCtrl->getCmd(), $this->table_obj);
     $tpl->getStandardTemplate();
     $tpl->setPermanentLink("dcl", $this->parent_obj->ref_id);
     if ($desc = $this->table_obj->getDescription()) {
         $desc = "<div class='ilDclTableDescription'>{$desc}</div>";
     }
     $tpl->setContent($desc . $list->getHTML());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:53,代码来源:class.ilDataCollectionRecordListGUI.php


示例20: initSettingsForm

 public function initSettingsForm($a_mode = 'edit')
 {
     $this->settings_form = new ilPropertyFormGUI();
     $this->settings_form->setTitle($this->lng->txt('payment_news_settings'));
     $oSelectBox = new ilSelectInputGUI($this->lng->txt('payment_news_archive_period'), 'archive_period');
     $oSelectBox->setInfo($this->lng->txt('payment_news_archive_period_info'));
     $options = array();
     for ($i = 5; $i <= 100; $i += 5) {
         $options[$i] = $i;
     }
     $oSelectBox->setOptions($options);
     $this->settings_form->addItem($oSelectBox);
     $this->settings_form->addCommandButton('saveSettings', $this->lng->txt('save'));
     $this->settings_form->addCommandButton('showNews', $this->lng->txt('cancel'));
     $this->settings_form->setFormAction($this->ctrl->getFormaction($this, 'saveSettings'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilShopNewsGUI.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilSession类代码示例发布时间:2022-05-23
下一篇:
PHP ilRadioOption类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap