本文整理汇总了PHP中ilSelectInputGUI::setInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP ilSelectInputGUI::setInfo方法的具体用法?PHP ilSelectInputGUI::setInfo怎么用?PHP ilSelectInputGUI::setInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilSelectInputGUI
的用法示例。
在下文中一共展示了ilSelectInputGUI::setInfo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
}
示例2: 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'));
}
示例3: 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;
}
示例4: generalSettingsObject
public function generalSettingsObject()
{
global $rbacsystem, $ilSetting;
/**
* @var $this->object ilObject
*/
// MINIMUM ACCESS LEVEL = 'read'
if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
$this->ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilErr->MESSAGE);
}
$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, 'saveGeneralSettings'));
$form->setTitle($this->lng->txt('pays_general_settings'));
$form->addCommandButton('saveGeneralSettings', $this->lng->txt('save'));
// enable webshop
$formItem = new ilCheckboxInputGUI($this->lng->txt('pay_enable_shop'), 'shop_enabled');
$formItem->setChecked((int) $genSetData['shop_enabled']);
$formItem->setInfo($this->lng->txt('pay_enable_shop_info'));
$form->addItem($formItem);
$formItem = new ilTextInputGUI($this->lng->txt('pays_currency_unit'), 'currency_unit');
$formItem->setSize(5);
$formItem->setValue($this->error != '' && isset($_POST['currency_unit']) ? ilUtil::prepareFormOutput($_POST['currency_unit'], true) : ilUtil::prepareFormOutput($genSetData['currency_unit'], true));
$formItem->setRequired(true);
$form->addItem($formItem);
$formItem = new ilTextAreaInputGUI($this->lng->txt('pays_address'), 'address');
$formItem->setRows(7);
$formItem->setCols(35);
$formItem->setRequired(true);
$formItem->setValue($this->error != '' && isset($_POST['address']) ? ilUtil::prepareFormOutput($_POST['address'], true) : $genSetData['address']);
$form->addItem($formItem);
$formItem = new ilTextAreaInputGUI($this->lng->txt('pays_bank_data'), 'bank_data');
$formItem->setRows(7);
$formItem->setCols(35);
$formItem->setRequired(true);
$formItem->setValue($this->error != '' && isset($_POST['bank_data']) ? ilUtil::prepareFormOutput($_POST['bank_data'], true) : $genSetData['bank_data']);
$form->addItem($formItem);
$formItem = new ilTextAreaInputGUI($this->lng->txt('pays_add_info'), 'add_info');
$formItem->setRows(7);
$formItem->setCols(35);
$formItem->setValue($this->error != '' && isset($_POST['add_info']) ? ilUtil::prepareFormOutput($_POST['add_info'], true) : $genSetData['add_info']);
$form->addItem($formItem);
$formItem = new ilTextInputGUI($this->lng->txt('pays_pdf_path'), 'pdf_path');
$formItem->setValue($this->error != "" && isset($_POST['pdf_path']) ? ilUtil::prepareFormOutput($_POST['pdf_path'], true) : ilUtil::prepareFormOutput($genSetData['pdf_path'], true));
$formItem->setRequired(true);
$form->addItem($formItem);
// max hits
$formItem = new ilSelectInputGUI($this->lng->txt('pay_max_hits'), 'max_hits');
$formItem->setValue($genSetData['max_hits']);
$options = array();
for ($i = 10; $i <= 100; $i += 10) {
$options[$i] = $i;
}
$formItem->setOptions($options);
$formItem->setInfo($this->lng->txt('pay_max_hits_info'));
$form->addItem($formItem);
// hide advanced search
$formItem = new ilCheckboxInputGUI($this->lng->txt('pay_hide_advanced_search'), 'hide_advanced_search');
$formItem->setChecked((int) $genSetData['hide_advanced_search']);
$formItem->setInfo($this->lng->txt('pay_hide_advanced_search_info'));
$form->addItem($formItem);
// hide shop news
$formItem = new ilCheckboxInputGUI($this->lng->txt('pay_hide_news'), 'hide_news');
$formItem->setChecked((int) $genSetData['hide_news']);
$formItem->setInfo($this->lng->txt('pay_hide_news_info'));
$form->addItem($formItem);
// Hide coupons
$formItem = new ilCheckboxInputGUI($this->lng->txt('pay_hide_coupons'), 'hide_coupons');
$formItem->setChecked((int) $genSetData['hide_coupons']);
$formItem->setInfo($this->lng->txt('pay_hide_coupons'));
$form->addItem($formItem);
// hide shop news
$formItem = new ilCheckboxInputGUI($this->lng->txt('pay_hide_shop_info'), 'hide_shop_info');
$formItem->setChecked((int) $genSetData['hide_shop_info']);
$formItem->setInfo($this->lng->txt('pay_hide_shop_info_info'));
$form->addItem($formItem);
// use shop specials
$formItem = new ilCheckboxInputGUI($this->lng->txt('use_shop_specials'), 'use_shop_specials');
$formItem->setChecked((int) $genSetData['use_shop_specials']);
$formItem->setInfo($this->lng->txt('use_shop_specials_info'));
$form->addItem($formItem);
// show general filter
$formItem = new ilCheckboxInputGUI($this->lng->txt('show_general_filter'), 'show_general_filter');
$formItem->setChecked((int) $genSetData['show_general_filter']);
$formItem->setInfo($this->lng->txt('show_general_filter_info'));
$form->addItem($formItem);
// show shop explorer
$formItem = new ilCheckboxInputGUI($this->lng->txt('show_shop_explorer'), 'show_shop_explorer');
$formItem->setChecked((int) $genSetData['show_shop_explorer']);
$formItem->setInfo($this->lng->txt('show_shop_explorer_info'));
$form->addItem($formItem);
/**/
// Enable payment notifications
$payment_noti = new ilCheckboxInputGUI($this->lng->txt("payment_notification"), "payment_notification");
$payment_noti->setValue(1);
$payment_noti->setChecked((int) $ilSetting->get('payment_notification', 0) == 1);
$payment_noti->setInfo($this->lng->txt('payment_notification_desc'));
$num_days = new ilNumberInputGUI($this->lng->txt('payment_notification_days'), 'payment_notification_days');
//.........这里部分代码省略.........
示例5: initSettingsForm
protected function initSettingsForm()
{
global $ilSetting;
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt("settings"));
$form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
// default repository view
$options = array("flat" => $this->lng->txt("flatview"), "tree" => $this->lng->txt("treeview"));
$si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
$si->setOptions($options);
$si->setInfo($this->lng->txt(""));
if ($ilSetting->get("default_repository_view") == "tree") {
$si->setValue("tree");
} else {
$si->setValue("flat");
}
$form->addItem($si);
//
$options = array("" => $this->lng->txt("adm_rep_tree_only_container"), "tree" => $this->lng->txt("adm_all_resource_types"));
// repository tree
$radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
$radg->setValue($ilSetting->get("repository_tree_pres"));
$op1 = new ilRadioOption($this->lng->txt("adm_rep_tree_only_cntr"), "", $this->lng->txt("adm_rep_tree_only_cntr_info"));
$radg->addOption($op1);
$op2 = new ilRadioOption($this->lng->txt("adm_rep_tree_all_types"), "all_types", $this->lng->txt("adm_rep_tree_all_types_info"));
// limit tree in courses and groups
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
$cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
$cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
$op2->addSubItem($cb);
$radg->addOption($op2);
$form->addItem($radg);
/* OBSOLETE
// synchronize repository tree with main view
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
$cb->setInfo($this->lng->txt("adm_synchronize_rep_tree_info"));
$cb->setChecked($ilSetting->get("rep_tree_synchronize"));
$form->addItem($cb);
*/
/* DISABLED
// repository access check
$options = array(
0 => "0",
10 => "10",
30 => "30",
60 => "60",
120 => "120"
);
$si = new ilSelectInputGUI($this->lng->txt("adm_repository_cache_time"), "rep_cache");
$si->setOptions($options);
$si->setValue($ilSetting->get("rep_cache"));
$si->setInfo($this->lng->txt("adm_repository_cache_time_info")." ".
$this->lng->txt("adm_repository_cache_time_info2"));
$form->addItem($si);
*/
// trash
$cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
$cb->setInfo($this->lng->txt("enable_trash_info"));
if ($ilSetting->get("enable_trash")) {
$cb->setChecked(true);
}
$form->addItem($cb);
// change event
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
$this->lng->loadLanguageModule("trac");
$event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking');
$event->setChecked(ilChangeEvent::_isActive());
$form->addItem($event);
include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_REPOSITORY, $form, $this);
// object lists
$lists = new ilFormSectionHeaderGUI();
$lists->setTitle($this->lng->txt("rep_object_lists"));
$form->addItem($lists);
$sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
$sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
$sdesc->setChecked($ilSetting->get("rep_shorten_description"));
$form->addItem($sdesc);
$sdesclen = new ilNumberInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
$sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
$sdesclen->setSize(3);
$sdesc->addSubItem($sdesclen);
// load action commands asynchronously
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
$cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
$cb->setChecked($ilSetting->get("item_cmd_asynch"));
$form->addItem($cb);
// notes/comments/tagging
$pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'), 'comments_tagging_in_lists');
$pl->setValue(1);
$pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
$form->addItem($pl);
$pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'), 'comments_tagging_in_lists_tags');
$pltags->setValue(1);
$pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
$pl->addSubItem($pltags);
$form->addCommandButton('saveSettings', $this->lng->txt('save'));
return $form;
}
示例6: editSOAPObject
/**
* Configure soap settings
*
* @access public
*/
function editSOAPObject()
{
global $rbacsystem, $rbacreview, $ilSetting, $ilCtrl, $lng;
if (!$rbacsystem->checkAccess("read", $this->object->getRefId())) {
$this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
}
$this->tabs_gui->setTabActive('auth_soap');
//set Template
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.auth_soap.html', 'Services/Authentication');
// compose role list
$role_list = $rbacreview->getRolesByFilter(2, $this->object->getId());
$roles = array();
foreach ($role_list as $role) {
$roles[$role['obj_id']] = $role['title'];
}
//set property form gui
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$soap_config = new ilPropertyFormGUI();
$soap_config->setTitle($this->lng->txt("auth_soap_auth"));
$soap_config->setDescription($this->lng->txt("auth_soap_auth_desc"));
$soap_config->setFormAction($this->ctrl->getFormAction($this, "editSOAP"));
$soap_config->addCommandButton("saveSOAP", $this->lng->txt("save"));
$soap_config->addCommandButton("editSOAP", $this->lng->txt("cancel"));
//set activ
$active = new ilCheckboxInputGUI();
$active->setTitle($this->lng->txt("active"));
$active->setPostVar("soap[active]");
//set server
$server = new ilTextInputGUI();
$server->setTitle($this->lng->txt("server"));
$server->setInfo($this->lng->txt("auth_soap_server_desc"));
$server->setPostVar("soap[server]");
$server->setSize(50);
$server->setMaxLength(256);
$server->setRequired(true);
//set port
$port = new ilTextInputGUI();
$port->setTitle($this->lng->txt("port"));
$port->setInfo($this->lng->txt("auth_soap_port_desc"));
$port->setPostVar("soap[port]");
$port->setSize(7);
$port->setMaxLength(5);
//set https
$https = new ilCheckboxInputGUI();
$https->setTitle($this->lng->txt("auth_soap_use_https"));
$https->setPostVar("soap[use_https]");
//set uri
$uri = new ilTextInputGUI();
$uri->setTitle($this->lng->txt("uri"));
$uri->setInfo($this->lng->txt("auth_soap_uri_desc"));
$uri->setPostVar("soap[uri]");
$uri->setSize(50);
$uri->setMaxLength(256);
//set namespace
$namespace = new ilTextInputGUI();
$namespace->setTitle($this->lng->txt("auth_soap_namespace"));
$namespace->setInfo($this->lng->txt("auth_soap_namespace_desc"));
$namespace->setPostVar("soap[namespace]");
$namespace->setSize(50);
$namespace->setMaxLength(256);
//set dotnet
$dotnet = new ilCheckboxInputGUI();
$dotnet->setTitle($this->lng->txt("auth_soap_use_dotnet"));
$dotnet->setPostVar("soap[use_dotnet]");
//set create users
$createuser = new ilCheckboxInputGUI();
$createuser->setTitle($this->lng->txt("auth_create_users"));
$createuser->setInfo($this->lng->txt("auth_soap_create_users_desc"));
$createuser->setPostVar("soap[create_users]");
//set account mail
$sendmail = new ilCheckboxInputGUI();
$sendmail->setTitle($this->lng->txt("user_send_new_account_mail"));
$sendmail->setInfo($this->lng->txt("auth_new_account_mail_desc"));
$sendmail->setPostVar("soap[account_mail]");
//set user default role
$defaultrole = new ilSelectInputGUI();
$defaultrole->setTitle($this->lng->txt("auth_user_default_role"));
$defaultrole->setInfo($this->lng->txt("auth_soap_user_default_role_desc"));
$defaultrole->setPostVar("soap[user_default_role]");
$defaultrole->setOptions($roles);
//set allow local authentication
$allowlocal = new ilCheckboxInputGUI();
$allowlocal->setTitle($this->lng->txt("auth_allow_local"));
$allowlocal->setInfo($this->lng->txt("auth_soap_allow_local_desc"));
$allowlocal->setPostVar("soap[allow_local]");
// get all settings
$settings = $ilSetting->getAll();
// get values in error case
if ($_SESSION["error_post_vars"]) {
$active->setChecked($_SESSION["error_post_vars"]["soap"]["active"]);
$server->setValue($_SESSION["error_post_vars"]["soap"]["server"]);
$port->setValue($_SESSION["error_post_vars"]["soap"]["port"]);
$https->setChecked($_SESSION["error_post_vars"]["soap"]["use_https"]);
$uri->setValue($_SESSION["error_post_vars"]["soap"]["uri"]);
$namespace->setValue($_SESSION["error_post_vars"]["soap"]["namespace"]);
//.........这里部分代码省略.........
示例7: initForm
private function initForm()
{
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'save'));
$this->form_gui->setTitle($this->lng->txt('ldap_configure'));
$active = new ilCheckboxInputGUI($this->lng->txt('auth_ldap_enable'), 'active');
$active->setValue(1);
$this->form_gui->addItem($active);
$ds = new ilCheckboxInputGUI($this->lng->txt('ldap_as_ds'), 'ds');
$ds->setValue(1);
$ds->setInfo($this->lng->txt('ldap_as_ds_info'));
$this->form_gui->addItem($ds);
$servername = new ilTextInputGUI($this->lng->txt('ldap_server_name'), 'server_name');
$servername->setRequired(true);
$servername->setInfo($this->lng->txt('ldap_server_name_info'));
$servername->setSize(32);
$servername->setMaxLength(32);
$this->form_gui->addItem($servername);
$serverurl = new ilTextInputGUI($this->lng->txt('ldap_server'), 'server_url');
$serverurl->setRequired(true);
$serverurl->setInfo($this->lng->txt('ldap_server_url_info'));
$serverurl->setSize(64);
$serverurl->setMaxLength(255);
$this->form_gui->addItem($serverurl);
$version = new ilSelectInputGUI($this->lng->txt('ldap_version'), 'version');
$version->setOptions(array(2 => 2, 3 => 3));
$version->setInfo($this->lng->txt('ldap_server_version_info'));
$this->form_gui->addItem($version);
$basedsn = new ilTextInputGUI($this->lng->txt('basedn'), 'base_dn');
$basedsn->setRequired(true);
$basedsn->setSize(64);
$basedsn->setMaxLength(255);
$this->form_gui->addItem($basedsn);
$referrals = new ilCheckboxInputGUI($this->lng->txt('ldap_referrals'), 'referrals');
$referrals->setValue(1);
$referrals->setInfo($this->lng->txt('ldap_referrals_info'));
$this->form_gui->addItem($referrals);
$section_security = new ilFormSectionHeaderGUI();
$section_security->setTitle($this->lng->txt('ldap_server_security_settings'));
$this->form_gui->addItem($section_security);
$tls = new ilCheckboxInputGUI($this->lng->txt('ldap_tls'), 'tls');
$tls->setValue(1);
$this->form_gui->addItem($tls);
$binding = new ilRadioGroupInputGUI($this->lng->txt('ldap_server_binding'), 'binding_type');
$anonymous = new ilRadioOption($this->lng->txt('ldap_bind_anonymous'), IL_LDAP_BIND_ANONYMOUS);
$binding->addOption($anonymous);
$user = new ilRadioOption($this->lng->txt('ldap_bind_user'), IL_LDAP_BIND_USER);
$dn = new ilTextInputGUI($this->lng->txt('ldap_server_bind_dn'), 'bind_dn');
$dn->setSize(64);
$dn->setMaxLength(255);
$user->addSubItem($dn);
$pass = new ilPasswordInputGUI($this->lng->txt('ldap_server_bind_pass'), 'bind_pass');
$pass->setSkipSyntaxCheck(true);
$pass->setSize(12);
$pass->setMaxLength(36);
$user->addSubItem($pass);
$binding->addOption($user);
$this->form_gui->addItem($binding);
$section_auth = new ilFormSectionHeaderGUI();
$section_auth->setTitle($this->lng->txt('ldap_authentication_settings'));
$this->form_gui->addItem($section_auth);
$search_base = new ilTextInputGUI($this->lng->txt('ldap_user_dn'), 'search_base');
$search_base->setInfo($this->lng->txt('ldap_search_base_info'));
$search_base->setSize(64);
$search_base->setMaxLength(255);
$this->form_gui->addItem($search_base);
$user_scope = new ilSelectInputGUI($this->lng->txt('ldap_user_scope'), 'user_scope');
$user_scope->setOptions(array(IL_LDAP_SCOPE_ONE => $this->lng->txt('ldap_scope_one'), IL_LDAP_SCOPE_SUB => $this->lng->txt('ldap_scope_sub')));
$user_scope->setInfo($this->lng->txt('ldap_user_scope_info'));
$this->form_gui->addItem($user_scope);
$user_attribute = new ilTextInputGUI($this->lng->txt('ldap_user_attribute'), 'user_attribute');
$user_attribute->setSize(16);
$user_attribute->setMaxLength(64);
$user_attribute->setRequired(true);
$this->form_gui->addItem($user_attribute);
$filter = new ilTextInputGUI($this->lng->txt('ldap_search_filter'), 'filter');
$filter->setInfo($this->lng->txt('ldap_filter_info'));
$filter->setSize(64);
$filter->setMaxLength(512);
$this->form_gui->addItem($filter);
$section_restrictions = new ilFormSectionHeaderGUI();
$section_restrictions->setTitle($this->lng->txt('ldap_group_restrictions'));
$this->form_gui->addItem($section_restrictions);
$group_dn = new ilTextInputGUI($this->lng->txt('ldap_group_search_base'), 'group_dn');
$group_dn->setInfo($this->lng->txt('ldap_group_dn_info'));
$group_dn->setSize(64);
$group_dn->setMaxLength(255);
$this->form_gui->addItem($group_dn);
$group_scope = new ilSelectInputGUI($this->lng->txt('ldap_group_scope'), 'group_scope');
$group_scope->setOptions(array(IL_LDAP_SCOPE_ONE => $this->lng->txt('ldap_scope_one'), IL_LDAP_SCOPE_SUB => $this->lng->txt('ldap_scope_sub')));
$group_scope->setInfo($this->lng->txt('ldap_group_scope_info'));
$this->form_gui->addItem($group_scope);
$group_filter = new ilTextInputGUI($this->lng->txt('ldap_group_filter'), 'group_filter');
$group_filter->setInfo($this->lng->txt('ldap_group_filter_info'));
$group_filter->setSize(64);
$group_filter->setMaxLength(255);
$this->form_gui->addItem($group_filter);
$group_member = new ilTextInputGUI($this->lng->txt('ldap_group_member'), 'group_member');
$group_member->setInfo($this->lng->txt('ldap_group_member_info'));
//.........这里部分代码省略.........
示例8: initSettingsForm
/**
* Init form.
*
* @param int $a_mode Edit Mode
*/
public function initSettingsForm()
{
global $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
// title
$title = new ilTextInputGUI($this->txt("title"), "title");
$title->setRequired(true);
$this->form->addItem($title);
// description
$description = new ilTextAreaInputGUI($this->txt("description"), "description");
$description->setCols(39);
$description->setRows(4);
$this->form->addItem($description);
// show submissions
$show_submissions = new ilCheckboxInputGUI($this->txt("show_submissions"), "show_submissions");
$show_submissions->setInfo($this->txt("show_submissions_info"));
$this->form->addItem($show_submissions);
// pass mode
$pass_mode = new ilRadioGroupInputGUI($this->txt("pass_mode"), "pass_mode");
$pass_all = new ilRadioOption($this->txt("pass_all"), "all", $this->txt("pass_all_info"));
$pass_mode->addOption($pass_all);
$pass_min = new ilRadioOption($this->txt("pass_minimum_nr"), "pass_min", $this->txt("pass_minimum_nr_info"));
$pass_mode->addOption($pass_min);
// minimum number of assignments to pass
$min_number = new ilNumberInputGUI($this->txt("min_nr"), "min_number");
$min_number->setSize(4);
$min_number->setMaxLength(4);
$min_number->setRequired(true);
include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php";
$mand = ilEphAssignment::countMandatory($this->object->getId());
$min = max($mand, 1);
$min_number->setMinValue($min);
$pass_min->addSubItem($min_number);
$this->form->addItem($pass_mode);
$notification = new ilCheckboxInputGUI($this->txt("submission_notification"), "notification");
$notification->setInfo($this->txt("submission_notification_info"));
$this->form->addItem($notification);
$copletion_by_submission = new ilCheckboxInputGUI($this->txt('completion_by_submission'), 'completion_by_submission');
$copletion_by_submission->setInfo($this->txt('completion_by_submission_info'));
$copletion_by_submission->setValue(1);
$this->form->addItem($copletion_by_submission);
$processtype = new ilSelectInputGUI($this->txt("processtype"), "processtype");
$processtype->setOptions(array(1 => $this->txt("default"), 2 => $this->txt("reference"), 3 => $this->txt("private")));
$processtype->setInfo($this->txt("processtype_description"));
$this->form->addItem($processtype);
$this->form->addCommandButton("updateSettings", $this->txt("save"));
$this->form->setTitle($this->txt("edit_ephorus_exercise"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}
示例9: editSettings
/**
* Edit news settings.
*/
public function editSettings()
{
global $ilCtrl, $lng, $ilSetting;
$news_set = new ilSetting("news");
$feed_set = new ilSetting("feed");
$enable_internal_news = $ilSetting->get("block_activated_news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
$rss_title_format = $news_set->get("rss_title_format");
$enable_private_feed = $news_set->get("enable_private_feed");
$news_default_visibility = $news_set->get("default_visibility") != "" ? $news_set->get("default_visibility") : "users";
$disable_repository_feeds = $feed_set->get("disable_rep_feeds");
$nr_personal_desktop_feeds = $ilSetting->get("block_limit_pdfeed");
$allow_shorter_periods = $news_set->get("allow_shorter_periods");
$allow_longer_periods = $news_set->get("allow_longer_periods");
include_once "./Services/News/classes/class.ilNewsItem.php";
$rss_period = ilNewsItem::_lookupRSSPeriod();
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("news_settings"));
// Enable internal news
$cb_prop = new ilCheckboxInputGUI($lng->txt("news_enable_internal_news"), "enable_internal_news");
$cb_prop->setValue("1");
$cb_prop->setInfo($lng->txt("news_enable_internal_news_info"));
$cb_prop->setChecked($enable_internal_news);
$form->addItem($cb_prop);
// Default Visibility
$radio_group = new ilRadioGroupInputGUI($lng->txt("news_default_visibility"), "news_default_visibility");
$radio_option = new ilRadioOption($lng->txt("news_visibility_users"), "users");
$radio_group->addOption($radio_option);
$radio_option = new ilRadioOption($lng->txt("news_visibility_public"), "public");
$radio_group->addOption($radio_option);
$radio_group->setInfo($lng->txt("news_news_item_visibility_info"));
$radio_group->setRequired(false);
$radio_group->setValue($news_default_visibility);
$form->addItem($radio_group);
// Number of news items per object
$nr_opts = array(50 => 50, 100 => 100, 200 => 200);
$nr_sel = new ilSelectInputGUI($lng->txt("news_nr_of_items"), "news_max_items");
$nr_sel->setInfo($lng->txt("news_nr_of_items_info"));
$nr_sel->setOptions($nr_opts);
$nr_sel->setValue($news_set->get("max_items"));
$form->addItem($nr_sel);
// Access Cache
$min_opts = array(0 => 0, 1 => 1, 2 => 2, 5 => 5, 10 => 10, 20 => 20, 30 => 30, 60 => 60);
$min_sel = new ilSelectInputGUI($lng->txt("news_cache"), "news_acc_cache_mins");
$min_sel->setInfo($lng->txt("news_cache_info"));
$min_sel->setOptions($min_opts);
$min_sel->setValue($news_set->get("acc_cache_mins"));
$form->addItem($min_sel);
// PD News Period
$per_opts = array(2 => "2 " . $lng->txt("days"), 3 => "3 " . $lng->txt("days"), 5 => "5 " . $lng->txt("days"), 7 => "1 " . $lng->txt("week"), 14 => "2 " . $lng->txt("weeks"), 30 => "1 " . $lng->txt("month"), 60 => "2 " . $lng->txt("months"), 120 => "4 " . $lng->txt("months"), 180 => "6 " . $lng->txt("months"), 366 => "1 " . $lng->txt("year"));
$per_sel = new ilSelectInputGUI($lng->txt("news_pd_period"), "news_pd_period");
$per_sel->setInfo($lng->txt("news_pd_period_info"));
$per_sel->setOptions($per_opts);
$per_sel->setValue((int) ilNewsItem::_lookupDefaultPDPeriod());
$form->addItem($per_sel);
// Allow user to choose lower values
$sp_prop = new ilCheckboxInputGUI($lng->txt("news_allow_shorter_periods"), "allow_shorter_periods");
$sp_prop->setValue("1");
$sp_prop->setInfo($lng->txt("news_allow_shorter_periods_info"));
$sp_prop->setChecked($allow_shorter_periods);
$form->addItem($sp_prop);
// Allow user to choose higher values
$lp_prop = new ilCheckboxInputGUI($lng->txt("news_allow_longer_periods"), "allow_longer_periods");
$lp_prop->setValue("1");
$lp_prop->setInfo($lng->txt("news_allow_longer_periods_info"));
$lp_prop->setChecked($allow_longer_periods);
$form->addItem($lp_prop);
// Enable rss for internal news
$cb_prop = new ilCheckboxInputGUI($lng->txt("news_enable_internal_rss"), "enable_internal_rss");
$cb_prop->setValue("1");
$cb_prop->setInfo($lng->txt("news_enable_internal_rss_info"));
$cb_prop->setChecked($enable_internal_rss);
// RSS News Period
$rssp_opts = array(2 => "2 " . $lng->txt("days"), 3 => "3 " . $lng->txt("days"), 5 => "5 " . $lng->txt("days"), 7 => "1 " . $lng->txt("week"), 14 => "2 " . $lng->txt("weeks"), 30 => "1 " . $lng->txt("month"), 60 => "2 " . $lng->txt("months"), 120 => "4 " . $lng->txt("months"), 180 => "6 " . $lng->txt("months"), 365 => "1 " . $lng->txt("year"));
$rssp_sel = new ilSelectInputGUI($lng->txt("news_rss_period"), "news_rss_period");
$rssp_sel->setOptions($rssp_opts);
$rssp_sel->setValue((int) $rss_period);
$cb_prop->addSubItem($rssp_sel);
// Section Header: RSS
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($lng->txt("news_rss"));
$form->addItem($sh);
// title format for rss entries
$options = array("" => $lng->txt("news_rss_title_format_obj_news"), "news_obj" => $lng->txt("news_rss_title_format_news_obj"));
$si = new ilSelectInputGUI($lng->txt("news_rss_title_format"), "rss_title_format");
$si->setOptions($options);
$si->setValue($rss_title_format);
$cb_prop->addSubItem($si);
$form->addItem($cb_prop);
// Enable private news feed
$cb_prop = new ilCheckboxInputGUI($lng->txt("news_enable_private_feed"), "enable_private_feed");
$cb_prop->setValue("1");
$cb_prop->setInfo($lng->txt("news_enable_private_feed_info"));
$cb_prop->setChecked($enable_private_feed);
$form->addItem($cb_prop);
//.........这里部分代码省略.........
示例10: settings
/**
* Edit settings.
*/
public function settings()
{
global $lng, $ilAccess;
$this->tabs_gui->setTabActive('settings');
$form_settings = new ilSetting("certificate");
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('certificate_settings'));
$active = new ilCheckboxInputGUI($this->lng->txt("active"), "active");
$active->setChecked($form_settings->get("active"));
$form->addItem($active);
$info = new ilNonEditableValueGUI($this->lng->txt("info"), "info");
$info->setValue($this->lng->txt("certificate_usage"));
$form->addItem($info);
$bgimage = new ilImageFileInputGUI($this->lng->txt("certificate_background_image"), "background");
$bgimage->setRequired(FALSE);
if (count($_POST)) {
// handle the background upload
if (strlen($_FILES["background"]["tmp_name"])) {
if ($bgimage->checkInput()) {
$result = $this->object->uploadBackgroundImage($_FILES["background"]["tmp_name"]);
if ($result == FALSE) {
$bgimage->setAlert($this->lng->txt("certificate_error_upload_bgimage"));
}
}
}
}
if (strlen($this->object->hasBackgroundImage())) {
$bgimage->setImage($this->object->getBackgroundImageThumbPathWeb());
}
$bgimage->setInfo($this->lng->txt("default_background_info"));
$form->addItem($bgimage);
$format = new ilSelectInputGUI($this->lng->txt("certificate_page_format"), "pageformat");
$defaultformats = array("a4" => $this->lng->txt("certificate_a4"), "a4landscape" => $this->lng->txt("certificate_a4_landscape"), "a5" => $this->lng->txt("certificate_a5"), "a5landscape" => $this->lng->txt("certificate_a5_landscape"), "letter" => $this->lng->txt("certificate_letter"), "letterlandscape" => $this->lng->txt("certificate_letter_landscape"));
$format->setOptions($defaultformats);
$format->setValue($form_settings->get("pageformat"));
$format->setInfo($this->lng->txt("certificate_page_format_info"));
$form->addItem($format);
if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
$form->addCommandButton('save', $this->lng->txt('save'));
}
$this->tpl->setContent($form->getHTML());
if (strcmp($this->ctrl->getCmd(), "save") == 0) {
if ($_POST["background_delete"]) {
$this->object->deleteBackgroundImage();
}
}
}
示例11: initSettingsForm
/**
* show settings table
*
* @access public
* @return
*/
public function initSettingsForm()
{
if (is_object($this->form)) {
return true;
}
include_once 'Services/Calendar/classes/class.ilCalendarUtil.php';
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this, 'save'));
$this->form->setTitle($this->lng->txt('cal_user_settings'));
$this->form->addCommandButton('save', $this->lng->txt('save'));
$this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
$select = new ilSelectInputGUI($this->lng->txt('cal_user_timezone'), 'timezone');
$select->setOptions(ilCalendarUtil::_getShortTimeZoneList());
$select->setInfo($this->lng->txt('cal_timezone_info'));
$select->setValue($this->user_settings->getTimeZone());
$this->form->addItem($select);
$export_type = new ilRadioGroupInputGUI($this->lng->txt('cal_export_timezone'), 'export_tz');
$export_type->setValue($this->user_settings->getExportTimeZoneType());
$export_tz = new ilRadioOption($this->lng->txt('cal_export_timezone_tz'), ilCalendarUserSettings::CAL_EXPORT_TZ_TZ);
$export_type->addOption($export_tz);
$export_utc = new ilRadioOption($this->lng->txt('cal_export_timezone_utc'), ilCalendarUserSettings::CAL_EXPORT_TZ_UTC);
$export_type->addOption($export_utc);
$this->form->addItem($export_type);
$year = date("Y");
$select = new ilSelectInputGUI($this->lng->txt('cal_user_date_format'), 'date_format');
$select->setOptions(array(ilCalendarSettings::DATE_FORMAT_DMY => '31.10.' . $year, ilCalendarSettings::DATE_FORMAT_YMD => $year . "-10-31", ilCalendarSettings::DATE_FORMAT_MDY => "10/31/" . $year));
$select->setInfo($this->lng->txt('cal_date_format_info'));
$select->setValue($this->user_settings->getDateFormat());
$this->form->addItem($select);
$select = new ilSelectInputGUI($this->lng->txt('cal_user_time_format'), 'time_format');
$select->setOptions(array(ilCalendarSettings::TIME_FORMAT_24 => '13:00', ilCalendarSettings::TIME_FORMAT_12 => '1:00pm'));
$select->setInfo($this->lng->txt('cal_time_format_info'));
$select->setValue($this->user_settings->getTimeFormat());
$this->form->addItem($select);
// Week/Month View
$week_month = new ilFormSectionHeaderGUI();
$week_month->setTitle($this->lng->txt('cal_week_month_view'));
$this->form->addItem($week_month);
$radio = new ilRadioGroupInputGUI($this->lng->txt('cal_week_start'), 'weekstart');
$radio->setValue($this->user_settings->getWeekStart());
$option = new ilRadioOption($this->lng->txt('l_su'), 0);
$radio->addOption($option);
$option = new ilRadioOption($this->lng->txt('l_mo'), 1);
$radio->addOption($option);
$this->form->addItem($radio);
// Day/Week View
$week_month = new ilFormSectionHeaderGUI();
$week_month->setTitle($this->lng->txt('cal_day_week_view'));
$this->form->addItem($week_month);
$day_start = new ilSelectInputGUI($this->lng->txt('cal_day_start'), 'dst');
$day_start->setOptions(ilCalendarUtil::getHourSelection($this->user_settings->getTimeFormat()));
$day_start->setValue($this->user_settings->getDayStart());
$this->form->addItem($day_start);
$day_end = new ilSelectInputGUI($this->lng->txt('cal_day_end'), 'den');
$day_end->setOptions(ilCalendarUtil::getHourSelection($this->user_settings->getTimeFormat()));
$day_end->setValue($this->user_settings->getDayEnd());
$this->form->addItem($day_end);
}
示例12: initGeneralSettingsForm
/**
* Init general settings form.
*
*/
public function initGeneralSettingsForm()
{
global $lng, $ilUser, $styleDefinition, $ilSetting;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
// language
if ($this->userSettingVisible("language")) {
$languages = $this->lng->getInstalledLanguages();
$options = array();
foreach ($languages as $lang_key) {
$options[$lang_key] = ilLanguage::_lookupEntry($lang_key, "meta", "meta_l_" . $lang_key);
}
$si = new ilSelectInputGUI($this->lng->txt("language"), "language");
$si->setOptions($options);
$si->setValue($ilUser->getLanguage());
$si->setDisabled($ilSetting->get("usr_settings_disable_language"));
$this->form->addItem($si);
}
// skin/style
include_once "./Services/Style/classes/class.ilObjStyleSettings.php";
if ($this->userSettingVisible("skin_style")) {
$templates = $styleDefinition->getAllTemplates();
if (is_array($templates)) {
$si = new ilSelectInputGUI($this->lng->txt("skin_style"), "skin_style");
$options = array();
foreach ($templates as $template) {
// get styles information of template
$styleDef = new ilStyleDefinition($template["id"]);
$styleDef->startParsing();
$styles = $styleDef->getStyles();
foreach ($styles as $style) {
if (!ilObjStyleSettings::_lookupActivatedStyle($template["id"], $style["id"])) {
continue;
}
$options[$template["id"] . ":" . $style["id"]] = $styleDef->getTemplateName() . " / " . $style["name"];
}
}
$si->setOptions($options);
$si->setValue($ilUser->skin . ":" . $ilUser->prefs["style"]);
$si->setDisabled($ilSetting->get("usr_settings_disable_skin_style"));
$this->form->addItem($si);
}
}
// screen reader optimization
if ($this->userSettingVisible("screen_reader_optimization")) {
$cb = new ilCheckboxInputGUI($this->lng->txt("user_screen_reader_optimization"), "screen_reader_optimization");
$cb->setChecked($ilUser->prefs["screen_reader_optimization"]);
$cb->setDisabled($ilSetting->get("usr_settings_disable_screen_reader_optimization"));
$cb->setInfo($this->lng->txt("user_screen_reader_optimization_info"));
$this->form->addItem($cb);
}
// hits per page
if ($this->userSettingVisible("hits_per_page")) {
$si = new ilSelectInputGUI($this->lng->txt("hits_per_page"), "hits_per_page");
$hits_options = array(10, 15, 20, 30, 40, 50, 100, 9999);
$options = array();
foreach ($hits_options as $hits_option) {
$hstr = $hits_option == 9999 ? $this->lng->txt("no_limit") : $hits_option;
$options[$hits_option] = $hstr;
}
$si->setOptions($options);
$si->setValue($ilUser->prefs["hits_per_page"]);
$si->setDisabled($ilSetting->get("usr_settings_disable_hits_per_page"));
$this->form->addItem($si);
}
// Users Online
if ($this->userSettingVisible("show_users_online")) {
$si = new ilSelectInputGUI($this->lng->txt("show_users_online"), "show_users_online");
$options = array("y" => $this->lng->txt("users_online_show_y"), "associated" => $this->lng->txt("users_online_show_associated"), "n" => $this->lng->txt("users_online_show_n"));
$si->setOptions($options);
$si->setValue($ilUser->prefs["show_users_online"]);
$si->setDisabled($ilSetting->get("usr_settings_disable_show_users_online"));
$this->form->addItem($si);
}
// Store last visited
$lv = new ilSelectInputGUI($this->lng->txt("user_store_last_visited"), "store_last_visited");
$options = array(0 => $this->lng->txt("user_lv_keep_entries"), 1 => $this->lng->txt("user_lv_keep_only_for_session"), 2 => $this->lng->txt("user_lv_do_not_store"));
$lv->setOptions($options);
$lv->setValue((int) $ilUser->prefs["store_last_visited"]);
$this->form->addItem($lv);
// hide_own_online_status
if ($this->userSettingVisible("hide_own_online_status")) {
$cb = new ilCheckboxInputGUI($this->lng->txt("hide_own_online_status"), "hide_own_online_status");
$cb->setChecked($ilUser->prefs["hide_own_online_status"] == "y");
$cb->setDisabled($ilSetting->get("usr_settings_disable_hide_own_online_status"));
$this->form->addItem($cb);
}
include_once 'Services/Authentication/classes/class.ilSessionReminder.php';
if (ilSessionReminder::isGloballyActivated()) {
$cb = new ilCheckboxInputGUI($this->lng->txt('session_reminder'), 'session_reminder_enabled');
$cb->setInfo($this->lng->txt('session_reminder_info'));
$cb->setValue(1);
$cb->setChecked((int) $ilUser->getPref('session_reminder_enabled'));
$expires = ilSession::getSessionExpireValue();
$lead_time_gui = new ilNumberInputGUI($this->lng->txt('session_reminder_lead_time'), 'session_reminder_lead_time');
$lead_time_gui->setInfo(sprintf($this->lng->txt('session_reminder_lead_time_info'), ilFormat::_secondsToString($expires, true)));
//.........这里部分代码省略.........
示例13: editCellAlignment
/**
* Edit cell styles
*/
function editCellAlignment()
{
global $ilCtrl, $tpl, $lng, $ilTabs;
$this->displayValidationError();
$this->setTabs();
$this->setCellPropertiesSubTabs();
$ilTabs->setSubTabActive("cont_alignment");
$ilTabs->setTabActive("cont_table_cell_properties");
// edit form
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($this->lng->txt("cont_table_cell_properties"));
// alignment
$options = array("" => $lng->txt("default"), "Left" => $lng->txt("cont_left"), "Center" => $lng->txt("cont_center"), "Right" => $lng->txt("cont_right"));
$si = new ilSelectInputGUI($lng->txt("cont_alignment"), "alignment");
$si->setOptions($options);
$si->setInfo($lng->txt(""));
$form->addItem($si);
$form->setKeepOpen(true);
$form->addCommandButton("setAlignment", $lng->txt("cont_set_alignment"));
$html = $form->getHTML();
$html .= "<br />" . $this->renderTable("table_edit", "alignment") . "</form>";
$tpl->setContent($html);
}
示例14: initFormSettings
/**
* Init the form to edit the type settings
*
* @param array values to set
*/
private function initFormSettings($a_values = array())
{
global $lng, $ilCtrl;
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt('settings'));
$item = new ilTextInputGUI($this->txt('type_name'), 'name');
$item->setValue($a_values['name']);
$item->setInfo($this->txt('type_name_info'));
$item->setRequired(true);
$item->setMaxLength(32);
$form->addItem($item);
$item = new ilTextInputGUI($lng->txt('title'), 'title');
$item->setValue($a_values['title']);
$item->setInfo($this->txt('type_title_info'));
$item->setRequired(true);
$item->setMaxLength(255);
$form->addItem($item);
$item = new ilTextInputGUI($lng->txt('description'), 'description');
$item->setValue($a_values['description']);
$item->setInfo($this->txt('type_description_info'));
$form->addItem($item);
$item = new ilSelectInputGUI($this->txt('type_availability'), 'availability');
$item->setOptions(array(ilExternalContentType::AVAILABILITY_CREATE => $this->txt('availability_' . ilExternalContentType::AVAILABILITY_CREATE), ilExternalContentType::AVAILABILITY_EXISTING => $this->txt('availability_' . ilExternalContentType::AVAILABILITY_EXISTING), ilExternalContentType::AVAILABILITY_NONE => $this->txt('availability_' . ilExternalContentType::AVAILABILITY_NONE)));
$item->setValue($a_values['availability']);
$item->setInfo($this->txt('type_availability_info'));
$item->setRequired(true);
$form->addItem($item);
$item = new ilTextAreaInputGUI($this->txt('type_remarks'), 'remarks');
$item->setInfo($this->txt('type_remarks_info'));
$item->setValue($a_values['remarks']);
$item->setRows(5);
$item->setCols(80);
$form->addItem($item);
// add the type specific fields
$this->type->addFormElements($form, $a_values, "type");
/*
// TOKEN MANAGEMENT
$item5 = new ilTextInputGUI($this->txt('type_time_to_delete'), 'time_to_delete');
$item5->setInfo($this->txt('type_time_to_delete_info'));
if(!$type->getTimeToDelete()){
$item5->setValue(10);
}else{
$item5->setValue($this->type->getTimeToDelete());
}
$item5->setRequired(true);
$item5->setMaxLength(32);
$form->addItem($item5);
//LOG MANAGEMENT
$item9 = new ilSelectInputGUI($this->txt('log_set'), 'use_logs');
$item9->setOptions(
array(
"ON" => $this->txt('log_on'),
"OFF" => $this->txt('log_off')
)
);
$item9->setInfo($this->txt('logs_info'));
$item9->setRequired(true);
$item9->setValue($this->type->getUseLogs());
$form->addItem($item9);
//LEARNING PROGRESS MANAGEMENT
$item10 = new ilSelectInputGUI($this->txt('learning_progress_set'), 'use_learning_progress');
$item10->setOptions(
array(
"ON" => $this->txt('lp_on'),
"OFF" => $this->txt('lp_off')
)
);
$item10->setInfo($this->txt('lp_info'));
$item10->setRequired(true);
$item10->setValue($this->type->getUseLearningProgress());
$form->addItem($item10);
*/
$form->addCommandButton('submitFormSettings', $lng->txt('save'));
$this->form = $form;
}
示例15: properties
/**
* scorm module properties
*/
function properties()
{
global $rbacsystem, $tree, $tpl, $lng, $ilToolbar, $ilCtrl, $ilSetting, $ilTabs;
$lng->loadLanguageModule("style");
ilObjSAHSLearningModuleGUI::setSettingsSubTabs();
$ilTabs->setSubTabActive('cont_settings');
// view
$ilToolbar->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=" . $this->object->getRefID(), "_blank");
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($ilCtrl->getFormAction($this));
$this->form->setTitle($this->lng->txt("cont_lm_properties"));
// SCORM-type
$ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
$ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
$this->form->addItem($ne);
// version
$ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
$ne->setValue($this->object->getModuleVersion());
$this->form->addItem($ne);
// online
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
$cb->setValue("y");
if ($this->object->getOnline()) {
$cb->setChecked(true);
}
$this->form->addItem($cb);
// offline Mode
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
$cb->setValue("y");
$cb->setChecked($this->object->getOfflineMode());
include_once "./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php";
if ($this->object->getOfflineMode() == true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
$cb->setDisabled(true);
$cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
} else {
$cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
}
$this->form->addItem($cb);
//
// presentation
//
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($this->lng->txt("cont_presentation"));
$this->form->addItem($sh);
// display mode (open)
$options = array("0" => $this->lng->txt("cont_open_normal"), "1" => $this->lng->txt("cont_open_iframe_max"), "2" => $this->lng->txt("cont_open_iframe_defined"), "5" => $this->lng->txt("cont_open_window_undefined"), "6" => $this->lng->txt("cont_open_window_defined"));
$si = new ilSelectInputGUI($this->lng->txt("cont_open"), "open_mode");
$si->setOptions($options);
$si->setValue($this->object->getOpenMode());
$this->form->addItem($si);
// width
$ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width");
$ni->setMaxLength(4);
$ni->setSize(4);
$ni->setValue($this->object->getWidth());
$this->form->addItem($ni);
// height
$ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height");
$ni->setMaxLength(4);
$ni->setSize(4);
$ni->setValue($this->object->getHeight());
$this->form->addItem($ni);
// auto navigation to last visited item
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
$cb->setValue("y");
$cb->setChecked($this->object->getAuto_last_visited());
$cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
$this->form->addItem($cb);
// auto continue
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_auto_continue"), "auto_continue");
$cb->setValue("y");
$cb->setChecked($this->object->getAutoContinue());
$this->form->addItem($cb);
//
// scorm options
//
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($this->lng->txt("cont_scorm_options"));
$this->form->addItem($sh);
// max attempts
$ni = new ilNumberInputGUI($this->lng->txt("cont_sc_max_attempt"), "max_attempt");
$ni->setMaxLength(3);
$ni->setSize(3);
$ni->setValue($this->object->getMaxAttempt());
$this->form->addItem($ni);
// lesson mode
$options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"), "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
$si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
$si->setOptions($options);
$si->setValue($this->object->getDefaultLessonMode());
$this->form->addItem($si);
// credit mode
$options = array("credit" => $this->lng->txt("cont_credit_on"), "no_credit" => $this->lng->txt("cont_credit_off"));
$si = new ilSelectInputGUI($this->lng->txt("cont_credit_mode"), "credit_mode");
$si->setOptions($options);
$si->setValue($this->object->getCreditMode());
//.........这里部分代码省略.........