本文整理汇总了PHP中ilCheckboxInputGUI类的典型用法代码示例。如果您正苦于以下问题:PHP ilCheckboxInputGUI类的具体用法?PHP ilCheckboxInputGUI怎么用?PHP ilCheckboxInputGUI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilCheckboxInputGUI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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
示例2: build
public function build()
{
$this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
$this->setTitle($this->lng->txt('tst_rnd_quest_set_cfg_general_form'));
$this->setId('tstRndQuestSetCfgGeneralForm');
$this->addCommandButton(ilTestRandomQuestionSetConfigGUI::CMD_SAVE_GENERAL_CONFIG_FORM, $this->lng->txt('save'));
// Require Pools with Homogeneous Scored Questions
$requirePoolsQuestionsHomoScored = new ilCheckboxInputGUI($this->lng->txt('tst_inp_all_quest_points_equal_per_pool'), 'quest_points_equal_per_pool');
$requirePoolsQuestionsHomoScored->setInfo($this->lng->txt('tst_inp_all_quest_points_equal_per_pool_desc'));
$requirePoolsQuestionsHomoScored->setChecked($this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired());
$this->addItem($requirePoolsQuestionsHomoScored);
// question amount config mode (per test / per pool)
$questionAmountConfigMode = new ilRadioGroupInputGUI($this->lng->txt('tst_inp_quest_amount_cfg_mode'), 'quest_amount_cfg_mode');
$questionAmountConfigMode->setValue($this->fetchValidQuestionAmountConfigModeWithFallbackModePerTest($this->questionSetConfig));
$questionAmountConfigModePerTest = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_test'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST);
$questionAmountConfigMode->addOption($questionAmountConfigModePerTest);
$questionAmountConfigModePerPool = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_pool'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL);
$questionAmountConfigMode->addOption($questionAmountConfigModePerPool);
$questionAmountConfigMode->setRequired(true);
$this->addItem($questionAmountConfigMode);
// question amount per test
$questionAmountPerTest = new ilNumberInputGUI($this->lng->txt('tst_inp_quest_amount_per_test'), 'quest_amount_per_test');
$questionAmountPerTest->setRequired(true);
$questionAmountPerTest->setMinValue(0);
$questionAmountPerTest->allowDecimals(false);
$questionAmountPerTest->setMinvalueShouldBeGreater(true);
$questionAmountPerTest->setSize(4);
$questionAmountPerTest->setValue($this->questionSetConfig->getQuestionAmountPerTest());
$questionAmountConfigModePerTest->addSubItem($questionAmountPerTest);
if ($this->testOBJ->participantDataExist()) {
$requirePoolsQuestionsHomoScored->setDisabled(true);
$questionAmountConfigMode->setDisabled(true);
$questionAmountPerTest->setDisabled(true);
}
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:35,代码来源:class.ilTestRandomQuestionSetGeneralConfigFormGUI.php
示例3: addToForm
public function addToForm()
{
global $lng;
$adt = $this->getADT();
$default = false;
if ($adt->isNull()) {
// see ilPersonalProfileGUI::addLocationToForm()
// use installation default
include_once "./Services/Maps/classes/class.ilMapUtil.php";
$def = ilMapUtil::getDefaultSettings();
$adt->setLatitude($def["latitude"]);
$adt->setLongitude($def["longitude"]);
$adt->setZoom($def["zoom"]);
$default = true;
}
// :TODO: title?
$title = $this->isRequired() ? $this->getTitle() : $lng->txt("location");
$loc = new ilLocationInputGUI($title, $this->getElementId());
$loc->setLongitude($adt->getLongitude());
$loc->setLatitude($adt->getLatitude());
$loc->setZoom($adt->getZoom());
$this->addBasicFieldProperties($loc, $adt->getCopyOfDefinition());
if (!$this->isRequired()) {
$optional = new ilCheckboxInputGUI($this->getTitle(), $this->getElementId() . "_tgl");
$optional->addSubItem($loc);
$this->addToParentElement($optional);
if (!$default && !$adt->isNull()) {
$optional->setChecked(true);
}
} else {
$this->addToParentElement($loc);
}
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilADTLocationFormBridge.php
示例4: addToForm
public function addToForm()
{
global $lng;
$adt = $this->getADT();
$default = false;
if ($adt->isNull()) {
// see ilPersonalProfileGUI::addLocationToForm()
// use installation default
include_once "./Services/Maps/classes/class.ilMapUtil.php";
$def = ilMapUtil::getDefaultSettings();
$adt->setLatitude($def["latitude"]);
$adt->setLongitude($def["longitude"]);
$adt->setZoom($def["zoom"]);
$default = true;
}
$optional = new ilCheckboxInputGUI($this->getTitle(), $this->addToElementId("tgl"));
if (!$default && !$adt->isNull()) {
$optional->setChecked(true);
}
$loc = new ilLocationInputGUI($lng->txt("location"), $this->getElementId());
$loc->setLongitude($adt->getLongitude());
$loc->setLatitude($adt->getLatitude());
$loc->setZoom($adt->getZoom());
$optional->addSubItem($loc);
$rad = new ilNumberInputGUI($lng->txt("form_location_radius"), $this->addToElementId("rad"));
$rad->setSize(4);
$rad->setSuffix($lng->txt("form_location_radius_km"));
$rad->setValue($this->radius);
$rad->setRequired(true);
$optional->addSubItem($rad);
$this->addToParentElement($optional);
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilADTLocationSearchBridgeSingle.php
示例5: initServiceSettingsForm
/**
* Init service settings form
* @param ilPropertyFormGUI $form
* @param type $services
*/
public static function initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
{
global $ilSetting;
if (in_array(self::CALENDAR_VISIBILITY, $services)) {
include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
if (ilCalendarSettings::_getInstance()->isEnabled()) {
// Container tools (calendar, news, ... activation)
$cal = new ilCheckboxInputGUI('', self::CALENDAR_VISIBILITY);
$cal->setValue(1);
include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
$cal->setChecked(ilCalendarSettings::lookupCalendarActivated($a_obj_id));
$cal->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_calendar'));
$form->addItem($cal);
}
}
if (in_array(self::NEWS_VISIBILITY, $services)) {
if ($ilSetting->get('block_activated_news')) {
// Container tools (calendar, news, ... activation)
$news = new ilCheckboxInputGUI('', self::NEWS_VISIBILITY);
$news->setValue(1);
$news->setChecked(ilContainer::_lookupContainerSetting($a_obj_id, self::NEWS_VISIBILITY, $ilSetting->get('block_activated_news', true)));
$news->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_news'));
$form->addItem($news);
}
}
return $form;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:32,代码来源:class.ilObjectServiceSettingsGUI.php
示例6: initForm
/**
* Init settings property form
*
* @access private
*/
private function initForm()
{
$this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
$name = new ilTextInputGUI($this->lng->txt("bibl_library_name"), 'name');
$name->setRequired(true);
$name->setValue('');
$this->addItem($name);
$url = new ilTextInputGUI($this->lng->txt("bibl_library_url"), 'url');
$url->setRequired(true);
$url->setValue('');
$this->addItem($url);
$img = new ilTextInputGUI($this->lng->txt("bibl_library_img"), 'img');
$img->setValue('');
$this->addItem($img);
$show_in_list = new ilCheckboxInputGUI($this->lng->txt("bibl_library_show_in_list"), 'show_in_list');
$show_in_list->setValue(1);
$this->addItem($show_in_list);
switch ($this->action) {
case 'create':
$this->setTitle($this->lng->txt("bibl_settings_new"));
$this->addCommandButton('create', $this->lng->txt('save'));
break;
case 'update':
$this->addCommandButton('update', $this->lng->txt('save'));
$this->fillForm();
$this->setTitle($this->lng->txt("bibl_settings_edit"));
break;
}
$this->addCommandButton('cancel', $this->lng->txt("cancel"));
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilObjBibliographicAdminLibrariesFormGUI.php
示例7: initEditCustomForm
protected function initEditCustomForm(ilPropertyFormGUI $a_form)
{
global $lng, $ilSetting;
if ($this->id_type == self::REPOSITORY_NODE_ID) {
$appr = new ilCheckboxInputGUI($lng->txt("blog_enable_approval"), "approval");
$appr->setInfo($lng->txt("blog_enable_approval_info"));
$a_form->addItem($appr);
}
$notes = new ilCheckboxInputGUI($lng->txt("blog_enable_notes"), "notes");
$a_form->addItem($notes);
if ($ilSetting->get('enable_global_profiles')) {
$rss = new ilCheckboxInputGUI($lng->txt("blog_enable_rss"), "rss");
$rss->setInfo($lng->txt("blog_enable_rss_info"));
$a_form->addItem($rss);
}
$ppic = new ilCheckboxInputGUI($lng->txt("blog_profile_picture"), "ppic");
$a_form->addItem($ppic);
$blga_set = new ilSetting("blga");
if ($blga_set->get("banner")) {
$dimensions = " (" . $blga_set->get("banner_width") . "x" . $blga_set->get("banner_height") . ")";
$img = new ilImageFileInputGUI($lng->txt("blog_banner") . $dimensions, "banner");
$a_form->addItem($img);
// show existing file
$file = $this->object->getImageFullPath(true);
if ($file) {
$img->setImage($file);
}
}
$bg_color = new ilColorPickerInputGUI($lng->txt("blog_background_color"), "bg_color");
$a_form->addItem($bg_color);
$font_color = new ilColorPickerInputGUI($lng->txt("blog_font_color"), "font_color");
$a_form->addItem($font_color);
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:33,代码来源:class.ilObjBlogGUI.php
示例8: addCustomSettingsToForm
public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
{
global $lng, $ilSetting;
$cb = new ilCheckboxInputGUI($lng->txt("cron_mail_notification_message"), "mail_notification_message");
$cb->setInfo($lng->txt("cron_mail_notification_message_info"));
$cb->setChecked($ilSetting->get("mail_notification_message"));
$a_form->addItem($cb);
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilMailCronNotification.php
示例9: addToForm
public function addToForm()
{
$bool = new ilCheckboxInputGUI($this->getTitle(), $this->getElementId());
$bool->setValue(1);
$this->addBasicFieldProperties($bool, $this->getADT()->getCopyOfDefinition());
// :TODO: required checkboxes do not make sense
$bool->setRequired(false);
$bool->setChecked($this->getADT()->getStatus());
$this->addToParentElement($bool);
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilADTBooleanFormBridge.php
示例10: addToForm
public function addToForm()
{
global $lng;
if ($this->getForm() instanceof ilPropertyFormGUI) {
// :TODO: use DateDurationInputGUI ?!
if (!(bool) $this->text_input) {
$check = new ilCheckboxInputGUI($this->getTitle(), $this->addToElementId("tgl"));
$check->setValue(1);
$checked = false;
} else {
$check = new ilCustomInputGUI($this->getTitle());
}
$date_from = new ilDateTimeInputGUI($lng->txt('from'), $this->addToElementId("lower"));
$date_from->setShowTime(true);
$check->addSubItem($date_from);
if ($this->getLowerADT()->getDate() && !$this->getLowerADT()->isNull()) {
$date_from->setDate($this->getLowerADT()->getDate());
$checked = true;
}
$date_until = new ilDateTimeInputGUI($lng->txt('until'), $this->addToElementId("upper"));
$date_until->setShowTime(true);
$check->addSubItem($date_until);
if ($this->getUpperADT()->getDate() && !$this->getUpperADT()->isNull()) {
$date_until->setDate($this->getUpperADT()->getDate());
$checked = true;
}
if (!(bool) $this->text_input) {
$check->setChecked($checked);
} else {
$date_from->setMode(ilDateTimeInputGUI::MODE_INPUT);
$date_until->setMode(ilDateTimeInputGUI::MODE_INPUT);
}
$this->addToParentElement($check);
} else {
// see ilTable2GUI::addFilterItemByMetaType()
include_once "./Services/Form/classes/class.ilCombinationInputGUI.php";
include_once "./Services/Form/classes/class.ilDateTimeInputGUI.php";
$item = new ilCombinationInputGUI($this->getTitle(), $this->getElementId());
$lower = new ilDateTimeInputGUI("", $this->addToElementId("lower"));
$lower->setShowTime(true);
$item->addCombinationItem("lower", $lower, $lng->txt("from"));
if ($this->getLowerADT()->getDate() && !$this->getLowerADT()->isNull()) {
$lower->setDate($this->getLowerADT()->getDate());
}
$upper = new ilDateTimeInputGUI("", $this->addToElementId("upper"));
$upper->setShowTime(true);
$item->addCombinationItem("upper", $upper, $lng->txt("to"));
if ($this->getUpperADT()->getDate() && !$this->getUpperADT()->isNull()) {
$upper->setDate($this->getUpperADT()->getDate());
}
$item->setComparisonMode(ilCombinationInputGUI::COMPARISON_ASCENDING);
$item->setMode(ilDateTimeInputGUI::MODE_INPUT);
$this->addToParentElement($item);
}
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilADTDateTimeSearchBridgeRange.php
示例11: initPluginSettings
public function initPluginSettings()
{
if ($this->getAdminConfigObject()->getDefaultAllowPublicLinksConfigAllowPublicLinks() && $this->getAdminConfigObject()->getDefaultAllowPublicLinks()) {
$public_links = new ilCheckboxInputGUI($this->txt("activate_public_links"), "activate_public_links");
$public_links->setInfo($this->txt("info_activate_public_links"));
$this->form->addItem($public_links);
}
if ($this->getAdminConfigObject()->getConfigMaxFileSize()) {
$max_file_size = new ilNumberInputGUI($this->txt("max_file_size"), "max_file_size");
$max_file_size->setInfo($this->txt("info_max_file_size"));
$max_file_size->setMaxLength(10);
$max_file_size->setSize(10);
$this->form->addItem($max_file_size);
}
}
开发者ID:studer-raimann,项目名称:Dropbox,代码行数:15,代码来源:class.ilDropboxSettingsGUI.php
示例12: _initForm
/**
* Init Social Bookmark edit/create Form
*
* @param ilObjectGUI $formhandlerObject taken as form target
* @param int $mode "create" / "edit"
*/
public static function _initForm($formhandlerObject, $mode = "create", $id = 0)
{
global $lng, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setMultipart(true);
// File Title
$in_title = new ilTextInputGUI($lng->txt("title"), "title");
$in_title->setMaxLength(128);
$in_title->setSize(40);
$in_title->setRequired(true);
$form->addItem($in_title);
// Link
$in_link = new ilTextInputGUI($lng->txt("link"), "link");
$in_link->setMaxLength(300);
$in_link->setSize(40);
$in_link->setRequired(true);
$in_link->setInfo($lng->txt('socialbm_link_description'));
$form->addItem($in_link);
// File
$in_file = new ilFileInputGUI($lng->txt("file"), "image_file");
$in_file->setSuffixes(array('bmp', 'gif', 'jpg', 'jpeg', 'png'));
$form->addItem($in_file);
// Activate on submit
$in_activate = new ilCheckboxInputGUI($lng->txt("activate"), "activate");
$in_activate->setValue('1');
$form->addItem($in_activate);
// save and cancel commands
if ($mode == "create") {
$form->addCommandButton("createSocialBookmark", $lng->txt("create"));
$form->addCommandButton("editSocialBookmarks", $lng->txt("cancel"));
$form->setTitle($lng->txt("adm_social_bm_create"));
$in_file->setRequired(true);
} else {
if ($mode == "update") {
$in_hidden = new ilHiddenInputGUI("sbm_id", $id);
$form->addItem($in_hidden);
$form->addCommandButton("updateSocialBookmark", $lng->txt("update"));
$form->addCommandButton("cancel", $lng->txt("cancel"));
$form->setTitle($lng->txt("adm_social_bm_edit"));
$in_file->setRequired(false);
}
}
$form->setTableWidth("60%");
$form->setFormAction($ilCtrl->getFormAction($formhandlerObject));
return $form;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:53,代码来源:class.ilSocialBookmarks.php
示例13: edit
/**
* Edit question overview form.
*/
function edit($a_insert = false)
{
global $ilCtrl, $tpl, $lng;
$this->displayValidationError();
// edit form
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
if ($a_insert) {
$form->setTitle($this->lng->txt("cont_ed_insert_qover"));
} else {
$form->setTitle($this->lng->txt("cont_edit_qover"));
}
// short message
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_qover_short_message"), "short");
$cb->setInfo($this->lng->txt("cont_qover_short_message_info"));
if (!$a_insert) {
$cb->setChecked($this->content_obj->getShortMessage());
} else {
$cb->setChecked(true);
}
$form->addItem($cb);
// list wrong questions
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_qover_list_wrong_q"), "wrong_questions");
$cb->setInfo($this->lng->txt("cont_qover_list_wrong_q_info"));
if (!$a_insert) {
$cb->setChecked($this->content_obj->getListWrongQuestions());
}
$form->addItem($cb);
// save/cancel buttons
if ($a_insert) {
$form->addCommandButton("create_qover", $lng->txt("save"));
$form->addCommandButton("cancelCreate", $lng->txt("cancel"));
} else {
$form->addCommandButton("update", $lng->txt("save"));
$form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
}
$html = $form->getHTML();
$tpl->setContent($html);
return $ret;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:44,代码来源:class.ilPCQuestionOverviewGUI.php
示例14: initPluginCreationFormSection
/**
* @param ilRadioOption $option
* @throws ilCloudPluginConfigException
*/
public function initPluginCreationFormSection(ilRadioOption $option)
{
$option->setInfo($this->txt("create_info1") . "</br>" . $this->txt("create_info2") . $this->getAdminConfigObject()->getAppName() . $this->txt("create_info3"));
$sub_selection = new ilRadioGroupInputGUI($this->txt(self::F_BASE_FOLDER), "dropbox_base_folder");
$sub_selection->setRequired(true);
$option_default = new ilRadioOption($this->txt("default_base_folder"), self::F_DROPBOX_DEFAULT_BASE_FOLDER);
$option_custom = new ilRadioOption($this->txt("custom_base_folder"), self::F_DROPBOX_CUSTOM_FOLDER_SELECTION);
$custom_base_folder_input = new ilTextInputGUI($this->txt("custom_base_folder_input"), self::F_DROPBOX_CUSTOM_BASE_FOLDER_INPUT);
$custom_base_folder_input->setRequired(true);
$custom_base_folder_input->setInfo($this->txt("custom_base_folder_input_info"));
$option_custom->addSubItem($custom_base_folder_input);
$sub_selection->addOption($option_default);
$sub_selection->addOption($option_custom);
$sub_selection->setValue(self::F_DROPBOX_DEFAULT_BASE_FOLDER);
$option->addSubItem($sub_selection);
$sub_selection2 = new ilCheckboxInputGUI($this->txt(self::F_ONLINE), self::F_ONLINE);
if ($this->getAdminConfigObject()->getValue('config_default_online')) {
$sub_selection2->setChecked(true);
}
$option->addSubItem($sub_selection2);
}
开发者ID:studer-raimann,项目名称:Dropbox,代码行数:25,代码来源:class.ilDropboxCreationGUI.php
示例15: initConfigurationForm
/**
* Init configuration form.
*
* @return object form object
*/
public function initConfigurationForm()
{
global $lng, $ilCtrl;
$pl = $this->getPluginObject();
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
// Setting for the ephorus logging
$ephorus_logging = new ilCheckboxInputGUI($pl->txt("ephorus_logging"), "ephorus_logging");
$ephorus_logging->setValue(1);
$ephorus_logging->setInfo($pl->txt("ephorus_logging_description"));
$form->addItem($ephorus_logging);
// Setting for the hand-in code
$handin_code = new ilTextInputGUI($pl->txt("handin_code"), "handin_code");
$handin_code->setRequired(true);
$form->addItem($handin_code);
// Setting for the hand-in address
$handin_address = new ilTextInputGUI($pl->txt("handin_address"), "handin_address");
$handin_address->setSize(80);
$handin_address->setRequired(true);
$form->addItem($handin_address);
// Setting for the index address
$index_address = new ilTextInputGUI($pl->txt("index_address"), "index_address");
$index_address->setSize(80);
$index_address->setRequired(true);
$form->addItem($index_address);
// Setting for the processtype
$processtype = new ilSelectInputGUI($pl->txt("default_processtype"), "processtype");
$processtype->setOptions(array(1 => $pl->txt("default"), 3 => $pl->txt("private")));
$processtype->setInfo($pl->txt("default_processtype_description"));
$form->addItem($processtype);
// Setting for the disclosure
$disclosure = new ilTextAreaInputGUI($pl->txt("disclosure"), "disclosure");
$disclosure->setCols(79);
$disclosure->setRows(4);
$form->addItem($disclosure);
$form->addCommandButton("save", $lng->txt("save") . " / " . $pl->txt("check_connection"));
$form->setTitle($pl->txt("ephorus_plugin_configuration"));
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:45,代码来源:class.ilEphorusConfigGUI.php
示例16: initConfigurationForm
/**
* Init configuration form
* @global type $ilCtrl
*/
protected function initConfigurationForm()
{
global $ilCtrl, $lng;
$settings = ilFhoevEventSettings::getInstance();
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->getPluginObject()->txt('tbl_fhoev_event_settings'));
$form->setFormAction($ilCtrl->getFormAction($this));
$form->addCommandButton('save', $lng->txt('save'));
$form->setShowTopButtons(false);
$lock = new ilCheckboxInputGUI($this->getPluginObject()->txt('tbl_settings_active'), 'active');
$lock->setValue(1);
$lock->setChecked($settings->isActive());
$form->addItem($lock);
$dtpl = new ilNumberInputGUI($this->getPluginObject()->txt('tbl_settings_dtpl'), 'dtpl');
$dtpl->setSize(8);
$dtpl->setValue($settings->getTemplateId());
$dtpl->setRequired(TRUE);
$dtpl->setMinValue(1);
$form->addItem($dtpl);
return $form;
}
开发者ID:leifos-gmbh,项目名称:FhoevEvent,代码行数:26,代码来源:class.ilFhoevEventConfigGUI.php
示例17: showTopicsSettings
public function showTopicsSettings()
{
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
$genSet = ilPaymentSettings::_getInstance();
$genSetData = $genSet->getAll();
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, 'saveTopicsSettings'));
$form->setTitle($this->lng->txt('pays_general_settings'));
$form->addCommandButton('saveTopicsSettings', $this->lng->txt('save'));
// use topics
$formItem = new ilCheckboxInputGUI($this->lng->txt('enable_topics'), 'enable_topics');
$formItem->setChecked((int) $genSetData['enable_topics']);
$formItem->setInfo($this->lng->txt('enable_topics_info'));
$form->addItem($formItem);
// default sorting type
$formItem = new ilSelectInputGUI($this->lng->txt('pay_topics_default_sorting_type'), 'topics_sorting_type');
$formItem->setValue($genSetData['topics_sorting_type']);
$options = array(1 => $this->lng->txt('pay_topics_sort_by_title'), 2 => $this->lng->txt('pay_topics_sort_by_date'), 3 => $this->lng->txt('pay_topics_sort_manually'));
$formItem->setOptions($options);
$form->addItem($formItem);
// default sorting direction
$formItem = new ilSelectInputGUI($this->lng->txt('pay_topics_default_sorting_direction'), 'topics_sorting_direction');
$formItem->setValue($genSetData['topics_sorting_direction']);
$options = array('asc' => $this->lng->txt('sort_asc'), 'desc' => $this->lng->txt('sort_desc'));
$formItem->setOptions($options);
$form->addItem($formItem);
// topics custom sorting
$formItem = new ilCheckboxInputGUI($this->lng->txt('pay_topics_allow_custom_sorting'), 'topics_allow_custom_sorting');
$formItem->setChecked((int) $genSetData['topics_allow_custom_sorting']);
$formItem->setInfo($this->lng->txt('pay_topics_allow_custom_sorting_info'));
$form->addItem($formItem);
// show topics filter
$formItem = new ilCheckboxInputGUI($this->lng->txt('show_topics_filter'), 'show_topics_filter');
$formItem->setChecked((int) $genSetData['show_topics_filter']);
$formItem->setInfo($this->lng->txt('show_topics_filter_info'));
$form->addItem($formItem);
$this->tpl->setVariable('FORM', $form->getHTML());
return true;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilShopTopicsGUI.php
示例18: getGeneralSettingsForm
public static function getGeneralSettingsForm()
{
global $lng;
$form = new ilPropertyFormGUI();
require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
$channels = ilNotificationDatabaseHandler::getAvailableChannels(array(), true);
$options = array('set_by_user' => $lng->txt('set_by_user'), 'set_by_admin' => $lng->txt('set_by_admin'));
/**
* @todo dirty...
*/
$form->restored_values = array();
$store_values = array();
foreach ($channels as $channel) {
$chb = new ilCheckboxInputGUI($lng->txt('enable_' . $channel['name']), 'enable_' . $channel['name']);
$store_values[] = 'enable_' . $channel['name'];
$select = new ilSelectInputGUI($lng->txt('config_type'), 'notifications[' . $channel['name'] . ']');
$select->setOptions($options);
$select->setValue($channel['config_type']);
$chb->addSubItem($select);
/**
* @todo dirty...
*/
$form->restored_values['notifications[' . $channel['name'] . ']'] = $channel['config_type'];
require_once $channel['include'];
// let the channel display their own settings below the "enable channel"
// checkbox
$result = call_user_func(array($channel['handler'], 'showSettings'), $chb);
if ($result) {
$store_values = array_merge($result, $store_values);
}
$form->addItem($chb);
}
/**
* @todo dirty...
*/
$form->store_values = $store_values;
return $form;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:38,代码来源:class.ilNotificationAdminSettingsForm.php
示例19: addCustomSettingsToForm
public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
{
global $lng;
$lng->loadLanguageModule("file");
require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
$disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
// Enable disk quota reminder mail
$cb_prop_reminder = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_reminder_mail"), "enable_disk_quota_reminder_mail");
$cb_prop_reminder->setValue('1');
$cb_prop_reminder->setChecked($disk_quota_obj->isDiskQuotaReminderMailEnabled());
$cb_prop_reminder->setInfo($lng->txt('disk_quota_reminder_mail_desc'));
$a_form->addItem($cb_prop_reminder);
// Enable summary mail for certain users
$cb_prop_summary = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_summary_mail"), "enable_disk_quota_summary_mail");
$cb_prop_summary->setValue(1);
$cb_prop_summary->setChecked($disk_quota_obj->isDiskQuotaSummaryMailEnabled());
$cb_prop_summary->setInfo($lng->txt('enable_disk_quota_summary_mail_desc'));
$a_form->addItem($cb_prop_summary);
// Edit disk quota recipients
$summary_rcpt = new ilTextInputGUI($lng->txt("disk_quota_summary_rctp"), "disk_quota_summary_rctp");
$summary_rcpt->setValue($disk_quota_obj->getSummaryRecipients());
$summary_rcpt->setInfo($lng->txt('disk_quota_summary_rctp_desc'));
$cb_prop_summary->addSubItem($summary_rcpt);
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:24,代码来源:class.ilDAVCronDiskQuota.php
示例20: initConfigurationForm
/**
* Init configuration form.
*
* @return object form object
*/
public function initConfigurationForm()
{
/** @var ilCtrl $ilCtrl */
global $lng, $ilCtrl;
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
foreach ($this->checkboxes as $key => $cb) {
if (!is_array($cb)) {
$checkbox = new ilCheckboxInputGUI($this->getPluginObject()->txt($cb), $cb);
$this->form->addItem($checkbox);
} else {
$checkbox = new ilCheckboxInputGUI($this->getPluginObject()->txt($key), $key);
foreach ($cb as $field => $gui) {
$sub = new $gui($this->getPluginObject()->txt($key . '_' . $field), $key . '_' . $field);
$checkbox->addSubItem($sub);
}
$this->form->addItem($checkbox);
}
}
$this->form->addCommandButton('save', $lng->txt('save'));
$this->form->setTitle($this->getPluginObject()->txt('configuration'));
$this->form->setFormAction($ilCtrl->getFormAction($this));
return $this->form;
}
开发者ID:studer-raimann,项目名称:ContainerFilter,代码行数:29,代码来源:class.ilContainerFilterConfigGUI.php
注:本文中的ilCheckboxInputGUI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论