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


PHP ilNonEditableValueGUI::setInfo方法代码示例

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


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

示例1: initLicenseForm

 protected function initLicenseForm()
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "updateLicense"));
     $form->setTitle($this->lng->txt('edit_license'));
     $exist = new ilNumberInputGUI($this->lng->txt("existing_licenses"), "licenses");
     $exist->setInfo($this->lng->txt("zero_licenses_explanation"));
     $exist->setMaxLength(10);
     $exist->setSize(10);
     $exist->setValue($this->license->getLicenses());
     $form->addItem($exist);
     $info_used = new ilNonEditableValueGUI($this->lng->txt("used_licenses"));
     $info_used->setInfo($this->lng->txt("used_licenses_explanation"));
     $info_used->setValue($this->license->getAccesses());
     $form->addItem($info_used);
     $remaining_licenses = $this->license->getLicenses() == "0" ? $this->lng->txt("arbitrary") : $this->license->getRemainingLicenses();
     $info_remain = new ilNonEditableValueGUI($this->lng->txt("remaining_licenses"));
     $info_remain->setInfo($this->lng->txt("remaining_licenses_explanation"));
     $info_remain->setValue($remaining_licenses);
     $form->addItem($info_remain);
     $info_potential = new ilNonEditableValueGUI($this->lng->txt("potential_accesses"));
     $info_potential->setInfo($this->lng->txt("potential_accesses_explanation"));
     $info_potential->setValue($this->license->getPotentialAccesses());
     $form->addItem($info_potential);
     $comm = new ilTextAreaInputGUI($this->lng->txt("comment"), "remarks");
     $comm->setRows(5);
     $comm->setValue($this->license->getRemarks());
     $form->addItem($comm);
     $form->addCommandButton('updateLicense', $this->lng->txt('save'));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilLicenseGUI.php

示例2: initServerInfoForm

 /**
  * Init server info form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initServerInfoForm()
 {
     global $lng, $ilClientIniFile, $ilSetting;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // installation name
     $ne = new ilNonEditableValueGUI($lng->txt("inst_name"), "");
     $ne->setValue($ilClientIniFile->readVariable("client", "name"));
     $ne->setInfo($ilClientIniFile->readVariable("client", "description"));
     $this->form->addItem($ne);
     // client id
     $ne = new ilNonEditableValueGUI($lng->txt("client_id"), "");
     $ne->setValue(CLIENT_ID);
     $this->form->addItem($ne);
     // installation id
     $ne = new ilNonEditableValueGUI($lng->txt("inst_id"), "");
     $ne->setValue($ilSetting->get("inst_id"));
     $this->form->addItem($ne);
     // database version
     $ne = new ilNonEditableValueGUI($lng->txt("db_version"), "");
     $ne->setValue($ilSetting->get("db_version"));
     include_once "./Services/Database/classes/class.ilDBUpdate.php";
     $this->form->addItem($ne);
     // ilias version
     $ne = new ilNonEditableValueGUI($lng->txt("ilias_version"), "");
     $ne->setValue($ilSetting->get("ilias_version"));
     $this->form->addItem($ne);
     // host
     $ne = new ilNonEditableValueGUI($lng->txt("host"), "");
     $ne->setValue($_SERVER["SERVER_NAME"]);
     $this->form->addItem($ne);
     // ip & port
     $ne = new ilNonEditableValueGUI($lng->txt("ip_address") . " & " . $this->lng->txt("port"), "");
     $ne->setValue($_SERVER["SERVER_ADDR"] . ":" . $_SERVER["SERVER_PORT"]);
     $this->form->addItem($ne);
     // server
     $ne = new ilNonEditableValueGUI($lng->txt("server_software"), "");
     $ne->setValue($_SERVER["SERVER_SOFTWARE"]);
     $this->form->addItem($ne);
     // http path
     $ne = new ilNonEditableValueGUI($lng->txt("http_path"), "");
     $ne->setValue(ILIAS_HTTP_PATH);
     $this->form->addItem($ne);
     // absolute path
     $ne = new ilNonEditableValueGUI($lng->txt("absolute_path"), "");
     $ne->setValue(ILIAS_ABSOLUTE_PATH);
     $this->form->addItem($ne);
     $not_set = $lng->txt("path_not_set");
     // convert
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_convert"), "");
     $ne->setValue(PATH_TO_CONVERT ? PATH_TO_CONVERT : $not_set);
     $this->form->addItem($ne);
     // zip
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_zip"), "");
     $ne->setValue(PATH_TO_ZIP ? PATH_TO_ZIP : $not_set);
     $this->form->addItem($ne);
     // unzip
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_unzip"), "");
     $ne->setValue(PATH_TO_UNZIP ? PATH_TO_UNZIP : $not_set);
     $this->form->addItem($ne);
     // java
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_java"), "");
     $ne->setValue(PATH_TO_JAVA ? PATH_TO_JAVA : $not_set);
     $this->form->addItem($ne);
     // htmldoc
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_htmldoc"), "");
     $ne->setValue(PATH_TO_HTMLDOC ? PATH_TO_HTMLDOC : $not_set);
     $this->form->addItem($ne);
     // mkisofs
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_mkisofs"), "");
     $ne->setValue(PATH_TO_MKISOFS ? PATH_TO_MKISOFS : $not_set);
     $this->form->addItem($ne);
     // latex
     $ne = new ilNonEditableValueGUI($lng->txt("url_to_latex"), "");
     $ne->setValue(URL_TO_LATEX ? URL_TO_LATEX : $not_set);
     $this->form->addItem($ne);
     $this->form->setTitle($lng->txt("server_data"));
     $this->form->setFormAction($this->ctrl->getFormAction($this));
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:84,代码来源:class.ilObjSystemFolderGUI.php

示例3: initAddCastItemForm

 /**
  * Init add cast item form.
  */
 function initAddCastItemForm($a_mode = "create")
 {
     global $lng, $ilCtrl, $ilTabs;
     $this->checkPermission("write");
     $ilTabs->activateTab("edit_content");
     $lng->loadLanguageModule("mcst");
     $news_set = new ilSetting("news");
     $enable_internal_rss = $news_set->get("enable_rss_for_internal");
     include "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setMultipart(true);
     // Property Title
     $text_input = new ilTextInputGUI($lng->txt("title"), "title");
     $text_input->setMaxLength(200);
     $this->form_gui->addItem($text_input);
     // Property Content
     $text_area = new ilTextAreaInputGUI($lng->txt("description"), "description");
     $text_area->setRequired(false);
     $this->form_gui->addItem($text_area);
     // Property Visibility
     if ($enable_internal_rss) {
         $radio_group = new ilRadioGroupInputGUI($lng->txt("access_scope"), "visibility");
         $radio_option = new ilRadioOption($lng->txt("access_users"), "users");
         $radio_group->addOption($radio_option);
         $radio_option = new ilRadioOption($lng->txt("access_public"), "public");
         $radio_group->addOption($radio_option);
         $radio_group->setInfo($lng->txt("mcst_visibility_info"));
         $radio_group->setRequired(true);
         $radio_group->setValue($this->object->getDefaultAccess() == 0 ? "users" : "public");
         $this->form_gui->addItem($radio_group);
     }
     // Duration
     $dur = new ilDurationInputGUI($lng->txt("mcst_duration"), "duration");
     $dur->setInfo($lng->txt("mcst_duration_info"));
     $dur->setShowDays(false);
     $dur->setShowHours(true);
     $dur->setShowSeconds(true);
     $this->form_gui->addItem($dur);
     foreach (ilObjMediaCast::$purposes as $purpose) {
         if ($purpose == "VideoAlternative" && $a_mode == "create") {
             continue;
         }
         $section = new ilFormSectionHeaderGUI();
         $section->setTitle($lng->txt("mcst_" . strtolower($purpose) . "_title"));
         $this->form_gui->addItem($section);
         if ($a_mode != "create") {
             $value = new ilHiddenInputGUI("value_" . $purpose);
             $label = new ilNonEditableValueGUI($lng->txt("value"));
             $label->setPostVar("label_value_" . $purpose);
             $label->setInfo($lng->txt("mcst_current_value_info"));
             $this->form_gui->addItem($label);
             $this->form_gui->addItem($value);
         }
         $file = new ilFileInputGUI($lng->txt("file"), "file_" . $purpose);
         $file->setSuffixes($this->purposeSuffixes[$purpose]);
         $this->form_gui->addItem($file);
         $text_input = new ilRegExpInputGUI($lng->txt("url"), "url_" . $purpose);
         $text_input->setPattern("/https?\\:\\/\\/.+/i");
         $text_input->setInfo($lng->txt("mcst_reference_info"));
         $this->form_gui->addItem($text_input);
         if ($purpose != "Standard") {
             $clearCheckBox = new ilCheckboxInputGUI();
             $clearCheckBox->setPostVar("delete_" . $purpose);
             $clearCheckBox->setTitle($lng->txt("mcst_clear_purpose_title"));
             $this->form_gui->addItem($clearCheckBox);
         } else {
             // mime type selection
             $mimeTypeSelection = new ilSelectInputGUI();
             $mimeTypeSelection->setPostVar("mimetype_" . $purpose);
             $mimeTypeSelection->setTitle($lng->txt("mcst_mimetype"));
             $mimeTypeSelection->setInfo($lng->txt("mcst_mimetype_info"));
             $options = array("" => $lng->txt("mcst_automatic_detection"));
             $options = array_merge($options, $this->mimeTypes);
             $mimeTypeSelection->setOptions($options);
             $this->form_gui->addItem($mimeTypeSelection);
             // preview picure
             $pp = new ilImageFileInputGUI($lng->txt("mcst_preview_picture"), "preview_pic");
             $pp->setSuffixes(array("png", "jpeg", "jpg"));
             $pp->setInfo($lng->txt("mcst_preview_picture_info") . " mp4, mp3, png, jp(e)g, gif");
             $this->form_gui->addItem($pp);
         }
     }
     // save/cancel button
     if ($a_mode == "create") {
         $this->form_gui->setTitle($lng->txt("mcst_add_new_item"));
         $this->form_gui->addCommandButton("saveCastItem", $lng->txt("save"));
     } else {
         $this->form_gui->setTitle($lng->txt("mcst_edit_item"));
         $this->form_gui->addCommandButton("updateCastItem", $lng->txt("save"));
     }
     $this->form_gui->addCommandButton("listItems", $lng->txt("cancel"));
     $this->form_gui->setFormAction($ilCtrl->getFormAction($this, "saveCastItem"));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:96,代码来源:class.ilObjMediaCastGUI.php

示例4: 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

示例5: initFormLink

 /**
  * Show create/edit single link
  * @param int form mode
  * @return 
  */
 protected function initFormLink($a_mode)
 {
     global $ilTabs;
     $ilTabs->activateTab("id_content");
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form = new ilPropertyFormGUI();
     switch ($a_mode) {
         case self::LINK_MOD_CREATE:
             // Header
             $this->ctrl->setParameter($this, 'new_type', 'webr');
             $this->form->setTitle($this->lng->txt('webr_new_link'));
             $this->form->setTableWidth('600px');
             // Buttons
             $this->form->addCommandButton('save', $this->lng->txt('webr_add'));
             $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
             break;
         case self::LINK_MOD_ADD:
             // Header
             $this->form->setTitle($this->lng->txt('webr_new_link'));
             // Buttons
             $this->form->addCommandButton('saveAddLink', $this->lng->txt('webr_add'));
             $this->form->addCommandButton('view', $this->lng->txt('cancel'));
             break;
         case self::LINK_MOD_EDIT:
             // Header
             $this->ctrl->setParameter($this, 'link_id', (int) $_REQUEST['link_id']);
             $this->form->setTitle($this->lng->txt('webr_edit'));
             // Buttons
             $this->form->addCommandButton('updateLink', $this->lng->txt('save'));
             $this->form->addCommandButton('view', $this->lng->txt('cancel'));
             break;
     }
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     if ($a_mode == self::LINK_MOD_ADD and $this->isContainerMetaDataRequired()) {
         ilUtil::sendInfo($this->lng->txt('webr_container_info'));
         $this->form->setTitle($this->lng->txt('webr_edit_list'));
         // List Title
         $title = new ilTextInputGUI($this->lng->txt('webr_list_title'), 'lti');
         $title->setRequired(true);
         $title->setSize(40);
         $title->setMaxLength(127);
         $this->form->addItem($title);
         // List Description
         $desc = new ilTextAreaInputGUI($this->lng->txt('webr_list_desc'), 'tde');
         $desc->setRows(3);
         $desc->setCols(40);
         $this->form->addItem($desc);
         // Addtional section
         $sect = new ilFormSectionHeaderGUI();
         $sect->setTitle($this->lng->txt('webr_add'));
         $this->form->addItem($sect);
     }
     // Target
     /*
     $tar = new ilTextInputGUI($this->lng->txt('webr_link_target'),'tar');
     $tar->setValue("http://");
     
     $tar->setSize(40);
     $tar->setMaxLength(500);
     */
     include_once 'Services/Form/classes/class.ilLinkInputGUI.php';
     $tar = new ilLinkInputGUI($this->lng->txt('webr_link_target'), 'tar');
     $tar->setInternalLinkFilterTypes(array("PageObject", "GlossaryItem", "RepositoryItem"));
     $tar->setRequired(true);
     $this->form->addItem($tar);
     // Title
     $tit = new ilTextInputGUI($this->lng->txt('webr_link_title'), 'tit');
     $tit->setRequired(true);
     $tit->setSize(40);
     $tit->setMaxLength(127);
     $this->form->addItem($tit);
     // Description
     $des = new ilTextAreaInputGUI($this->lng->txt('description'), 'des');
     $des->setRows(3);
     $des->setCols(40);
     $this->form->addItem($des);
     if ($a_mode != self::LINK_MOD_CREATE) {
         // Active
         $act = new ilCheckboxInputGUI($this->lng->txt('active'), 'act');
         $act->setChecked(true);
         $act->setValue(1);
         $this->form->addItem($act);
         // Check
         $che = new ilCheckboxInputGUI($this->lng->txt('webr_disable_check'), 'che');
         $che->setValue(1);
         $this->form->addItem($che);
     }
     // Valid
     if ($a_mode == self::LINK_MOD_EDIT) {
         $val = new ilCheckboxInputGUI($this->lng->txt('valid'), 'vali');
         $this->form->addItem($val);
     }
     if (ilParameterAppender::_isEnabled() && $a_mode != self::LINK_MOD_CREATE) {
         $dyn = new ilNonEditableValueGUI($this->lng->txt('links_dyn_parameter'));
         $dyn->setInfo($this->lng->txt('links_dynamic_info'));
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjLinkResourceGUI.php

示例6: initCronJobsForm

 /**
  * Init cron jobs form.
  */
 public function initCronJobsForm()
 {
     global $lng, $ilSetting, $rbacreview, $ilObjDataCache;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $cls = new ilNonEditableValueGUI($this->lng->txt('cronjob_last_start'), 'cronjob_last_start');
     if ($ilSetting->get('last_cronjob_start_ts')) {
         include_once './Services/Calendar/classes/class.ilDatePresentation.php';
         $cls->setInfo(ilDatePresentation::formatDate(new ilDateTime($ilSetting->get('last_cronjob_start_ts'), IL_CAL_UNIX)));
     } else {
         $cls->setInfo($this->lng->txt('cronjob_last_start_unknown'));
     }
     $this->form->addItem($cls);
     // check user accounts
     $cb = new ilCheckboxInputGUI($this->lng->txt("check_user_accounts"), "cron_user_check");
     $cb->setInfo($this->lng->txt("check_user_accounts_desc"));
     if ($ilSetting->get("cron_user_check")) {
         $cb->setChecked(true);
     }
     $this->form->addItem($cb);
     // delete inactive user accounts
     require_once 'Services/User/classes/class.ilCronDeleteInactiveUserAccounts.php';
     $cb = new ilCheckboxInputGUI($this->lng->txt("delete_inactive_user_accounts"), "cron_inactive_user_delete");
     $cb->setInfo($this->lng->txt("delete_inactive_user_accounts_desc"));
     if ($ilSetting->get("cron_inactive_user_delete", false)) {
         $cb->setChecked(true);
     }
     $sub_list = new ilSelectInputGUI($this->lng->txt('delete_inactive_user_accounts_interval'), 'cron_inactive_user_delete_interval');
     $sub_list->setInfo($this->lng->txt('delete_inactive_user_accounts_interval_desc'));
     $sub_list->setOptions(ilCronDeleteInactiveUserAccounts::getPossibleIntervalsArray());
     $sub_list->setValue($ilSetting->get('cron_inactive_user_delete_interval', ilCronDeleteInactiveUserAccounts::getDefaultIntervalKey()));
     $cb->addSubItem($sub_list);
     include_once 'Services/Form/classes/class.ilMultiSelectInputGUI.php';
     $sub_mlist = new ilMultiSelectInputGUI($this->lng->txt('delete_inactive_user_accounts_include_roles'), 'cron_inactive_user_delete_include_roles');
     $sub_mlist->setInfo($this->lng->txt('delete_inactive_user_accounts_include_roles_desc'));
     $roles = array();
     foreach ($rbacreview->getGlobalRoles() as $role_id) {
         if ($role_id != ANONYMOUS_ROLE_ID) {
             $roles[$role_id] = $ilObjDataCache->lookupTitle($role_id);
         }
     }
     $sub_mlist->setOptions($roles);
     $setting = $ilSetting->get('cron_inactive_user_delete_include_roles', null);
     if ($setting === null) {
         $setting = array();
     } else {
         $setting = explode(',', $setting);
     }
     $sub_mlist->setValue($setting);
     $sub_mlist->setWidth(300);
     #$sub_mlist->setHeight(100);
     $cb->addSubItem($sub_mlist);
     $default_setting = ilCronDeleteInactiveUserAccounts::DEFAULT_INACTIVITY_PERIOD;
     $sub_text = new ilTextInputGUI($this->lng->txt('delete_inactive_user_accounts_period'), 'cron_inactive_user_delete_period');
     $sub_text->setInfo($this->lng->txt('delete_inactive_user_accounts_period_desc'));
     $sub_text->setValue($ilSetting->get("cron_inactive_user_delete_period", $default_setting));
     $sub_text->setSize(2);
     $sub_text->setMaxLength(3);
     $cb->addSubItem($sub_text);
     /*		$default_setting = ilCronDeleteInactiveUserAccounts::DEFAULT_SETTING_INCLUDE_ADMINS;
     				$sub_cb = new ilCheckboxInputGUI($this->lng->txt('delete_inactive_user_accounts_include_admins'),'cron_inactive_user_delete_include_admins');
     				$sub_cb->setChecked($ilSetting->get("cron_inactive_user_delete_include_admins", $default_setting) ? 1 : 0 );
     				//$sub_cb->setOptionTitle($this->lng->txt('delete_inactive_user_accounts_include_admins'));
     				$sub_cb->setInfo($this->lng->txt('delete_inactive_user_accounts_include_admins_desc'));
     		$cb->addSubItem($sub_cb);
     		*/
     $this->form->addItem($cb);
     // delete inactivated user accounts
     require_once 'Services/User/classes/class.ilCronDeleteInactivatedUserAccounts.php';
     $cb = new ilCheckboxInputGUI($this->lng->txt("delete_inactivated_user_accounts"), "cron_inactivated_user_delete");
     $cb->setInfo($this->lng->txt("delete_inactivated_user_accounts_desc"));
     if ($ilSetting->get("cron_inactivated_user_delete", false)) {
         $cb->setChecked(true);
     }
     $sub_list = new ilSelectInputGUI($this->lng->txt('delete_inactivated_user_accounts_interval'), 'cron_inactivated_user_delete_interval');
     $sub_list->setInfo($this->lng->txt('delete_inactivated_user_accounts_interval_desc'));
     $sub_list->setOptions(ilCronDeleteInactiveUserAccounts::getPossibleIntervalsArray());
     $sub_list->setValue($ilSetting->get('cron_inactivated_user_delete_interval', ilCronDeleteInactiveUserAccounts::getDefaultIntervalKey()));
     $cb->addSubItem($sub_list);
     include_once 'Services/Form/classes/class.ilMultiSelectInputGUI.php';
     $sub_mlist = new ilMultiSelectInputGUI($this->lng->txt('delete_inactivated_user_accounts_include_roles'), 'cron_inactivated_user_delete_include_roles');
     $sub_mlist->setInfo($this->lng->txt('delete_inactivated_user_accounts_include_roles_desc'));
     $roles = array();
     foreach ($rbacreview->getGlobalRoles() as $role_id) {
         if ($role_id != ANONYMOUS_ROLE_ID) {
             $roles[$role_id] = $ilObjDataCache->lookupTitle($role_id);
         }
     }
     $sub_mlist->setOptions($roles);
     $setting = $ilSetting->get('cron_inactivated_user_delete_include_roles', null);
     if ($setting === null) {
         $setting = array();
     } else {
         $setting = explode(',', $setting);
     }
     $sub_mlist->setValue($setting);
     $sub_mlist->setWidth(300);
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjSystemFolderGUI.php

示例7: initKeywordsForm

 protected function initKeywordsForm()
 {
     global $ilUser;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "saveKeywordsForm"));
     $form->setTitle($this->lng->txt("blog_edit_keywords"));
     $txt = new ilTextInputGUI($this->lng->txt("blog_keywords"), "keywords");
     // $txt->setRequired(true); #10504
     $txt->setMulti(true);
     $txt->setDataSource($this->ctrl->getLinkTarget($this, "keywordAutocomplete", "", true));
     $txt->setMaxLength(200);
     $txt->setSize(50);
     $txt->setInfo($this->lng->txt("blog_keywords_info"));
     $form->addItem($txt);
     $md_section = $this->getBlogPosting()->getMDSection();
     $keywords = array();
     foreach ($ids = $md_section->getKeywordIds() as $id) {
         $md_key = $md_section->getKeyword($id);
         if (trim($md_key->getKeyword()) != "") {
             $keywords[$md_key->getKeywordLanguageCode()][] = $md_key->getKeyword();
         }
     }
     // language is not "used" anywhere
     $ulang = $ilUser->getLanguage();
     if ($keywords[$ulang]) {
         asort($keywords[$ulang]);
         $txt->setValue($keywords[$ulang]);
     }
     // other keywords in blog
     $other = array();
     foreach (array_keys(ilBlogPosting::getAllPostings($this->getBlogPosting()->getBlogId())) as $posting_id) {
         if ($posting_id != $this->getBlogPosting()->getId()) {
             $other = array_merge($other, ilBlogPosting::getKeywords($this->getBlogPosting()->getBlogId(), $posting_id));
         }
     }
     if (is_array($keywords[$ulang])) {
         $other = array_diff($other, $keywords[$ulang]);
     }
     if (sizeof($other)) {
         $html = "";
         foreach ($other as $item) {
             $html .= '<span class="ilTag">' . $item . '</span>';
         }
         $info = new ilNonEditableValueGUI($this->lng->txt("blog_keywords_other"), "", true);
         $info->setInfo($this->lng->txt("blog_keywords_other_info"));
         $info->setValue($html);
         $form->addItem($info);
     }
     $form->addCommandButton("saveKeywordsForm", $this->lng->txt("save"));
     $form->addCommandButton("preview", $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:53,代码来源:class.ilBlogPostingGUI.php

示例8: initForm

 /**
  * Init user form
  */
 function initForm($a_mode)
 {
     global $lng, $ilCtrl, $styleDefinition, $ilSetting, $ilClientIniFile, $ilUser;
     $settings = $ilSetting->getAll();
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
     if ($a_mode == "create") {
         $this->form_gui->setTitle($lng->txt("usr_new"));
     } else {
         $this->form_gui->setTitle($lng->txt("usr_edit"));
     }
     // login data
     $sec_l = new ilFormSectionHeaderGUI();
     $sec_l->setTitle($lng->txt("login_data"));
     $this->form_gui->addItem($sec_l);
     // authentication mode
     include_once './Services/Authentication/classes/class.ilAuthUtils.php';
     $active_auth_modes = ilAuthUtils::_getActiveAuthModes();
     $am = new ilSelectInputGUI($lng->txt("auth_mode"), "auth_mode");
     $option = array();
     foreach ($active_auth_modes as $auth_name => $auth_key) {
         if ($auth_name == 'default') {
             $name = $this->lng->txt('auth_' . $auth_name) . " (" . $this->lng->txt('auth_' . ilAuthUtils::_getAuthModeName($auth_key)) . ")";
         } else {
             $name = $this->lng->txt('auth_' . $auth_name);
         }
         $option[$auth_name] = $name;
     }
     $am->setOptions($option);
     $this->form_gui->addItem($am);
     if ($a_mode == "edit") {
         $id = new ilNonEditableValueGUI($lng->txt("usr_id"), "id");
         $id->setValue($this->object->getId());
         $this->form_gui->addItem($id);
     }
     // login
     $lo = new ilUserLoginInputGUI($lng->txt("login"), "login");
     $lo->setRequired(true);
     if ($a_mode == "edit") {
         $lo->setCurrentUserId($this->object->getId());
         try {
             include_once 'Services/Calendar/classes/class.ilDate.php';
             $last_history_entry = ilObjUser::_getLastHistoryDataByUserId($this->object->getId());
             $lo->setInfo(sprintf($this->lng->txt('usr_loginname_history_info'), ilDatePresentation::formatDate(new ilDateTime($last_history_entry[1], IL_CAL_UNIX)), $last_history_entry[0]));
         } catch (ilUserException $e) {
         }
     }
     $this->form_gui->addItem($lo);
     $pw = new ilPasswordInputGUI($lng->txt("passwd"), "passwd");
     $pw->setSize(32);
     $pw->setMaxLength(32);
     $pw->setValidateAuthPost("auth_mode");
     if ($a_mode == "create") {
         $pw->setRequiredOnAuth(true);
     }
     $pw->setInfo(ilUtil::getPasswordRequirementsInfo());
     $this->form_gui->addItem($pw);
     // @todo: invisible/hidden passwords
     // external account
     include_once './Services/Authentication/classes/class.ilAuthUtils.php';
     if (ilAuthUtils::_isExternalAccountEnabled()) {
         $ext = new ilTextInputGUI($lng->txt("user_ext_account"), "ext_account");
         $ext->setSize(40);
         $ext->setMaxLength(250);
         $ext->setInfo($lng->txt("user_ext_account_desc"));
         $this->form_gui->addItem($ext);
     }
     // login data
     $sec_si = new ilFormSectionHeaderGUI();
     $sec_si->setTitle($this->lng->txt("system_information"));
     $this->form_gui->addItem($sec_si);
     // create date, approve date, agreement date, last login
     if ($a_mode == "edit") {
         $sia = array("create_date", "approve_date", "agree_date", "last_login", "owner");
         foreach ($sia as $a) {
             $siai = new ilNonEditableValueGUI($lng->txt($a), $a);
             $this->form_gui->addItem($siai);
         }
     }
     // active
     $ac = new ilCheckboxInputGUI($lng->txt("active"), "active");
     $ac->setChecked(true);
     $this->form_gui->addItem($ac);
     // access	@todo: get fields right (names change)
     $lng->loadLanguageModule('crs');
     // access
     $radg = new ilRadioGroupInputGUI($lng->txt("time_limit"), "time_limit_unlimited");
     $radg->setValue(1);
     $op1 = new ilRadioOption($lng->txt("user_access_unlimited"), 1);
     $radg->addOption($op1);
     $op2 = new ilRadioOption($lng->txt("user_access_limited"), 0);
     $radg->addOption($op2);
     //		$ac = new ilCheckboxInputGUI($lng->txt("time_limit"), "time_limit_unlimited");
     //		$ac->setChecked(true);
     //		$ac->setOptionTitle($lng->txt("crs_unlimited"));
     // access.from
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjUserGUI.php

示例9: getInputField

 /**
  * @param ilDataCollectionField $field
  *
  * @return ilCheckboxInputGUI|ilDateTimeInputGUI|ilFileInputGUI|ilTextInputGUI|NULL
  */
 static function getInputField(ilDataCollectionField $field)
 {
     global $lng;
     $type_id = $field->getDatatypeId();
     $title = $field->getTitle();
     $input = NULL;
     switch ($type_id) {
         case ilDataCollectionDatatype::INPUTFORMAT_TEXT:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             if ($field->getTextArea()) {
                 $input = new ilTextAreaInputGUI($title, 'field_' . $field->getId());
             }
             if ($field->getLength()) {
                 $input->setInfo($lng->txt("dcl_max_text_length") . ": " . $field->getLength());
                 if (!$field->getTextArea()) {
                     $input->setMaxLength($field->getLength());
                 }
             }
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_NUMBER:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_BOOLEAN:
             $input = new ilDclCheckboxInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_DATETIME:
             $input = new ilDateTimeInputGUI($title, 'field_' . $field->getId());
             $input->setStartYear(date("Y") - 100);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_FILE:
             $input = new ilFileInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_REFERENCE:
             if (!$field->isNRef()) {
                 $input = new ilSelectInputGUI($title, 'field_' . $field->getId());
             } else {
                 $input = new ilMultiSelectInputGUI($title, 'field_' . $field->getId());
             }
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_RATING:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             $input->setValue($lng->txt("dcl_editable_in_table_gui"));
             $input->setDisabled(true);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_ILIAS_REF:
             $input = new ilDataCollectionTreePickInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_MOB:
             $input = new ilFileInputGUI($title, 'field_' . $field->getId());
             $input->setSuffixes(self::$mob_suffixes);
             $input->setAllowDeletion(true);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_FORMULA:
             $input = new ilNonEditableValueGUI($title, 'field_' . $field->getId());
             $input->setValue('-');
             break;
     }
     if ($field->getDescription() && $input !== NULL) {
         $input->setInfo($field->getDescription() . ($input->getInfo() ? "<br>" . $input->getInfo() : ""));
     }
     return $input;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.ilDataCollectionDatatype.php


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