/** * @return ilPropertyFormGUI */ protected function getSettingsForm() { require_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setTitle($this->lng->txt('settings')); require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php'; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_ACCESSIBILITY, $form, $this); return $form; }
protected static function initObjectMap() { global $tree; $map = array("adm" => SYSTEM_FOLDER_ID); foreach ($tree->getChilds(SYSTEM_FOLDER_ID) as $obj) { $map[$obj["type"]] = $obj["ref_id"]; } self::$OBJ_MAP = $map; }
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; }
private function initForm() { 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('general_settings')); // Subject prefix $pre = new ilTextInputGUI($this->lng->txt('mail_subject_prefix'), 'mail_subject_prefix'); $pre->setSize(12); $pre->setMaxLength(32); $pre->setInfo($this->lng->txt('mail_subject_prefix_info')); $this->form->addItem($pre); // incoming type include_once 'Services/Mail/classes/class.ilMailOptions.php'; $options = array(IL_MAIL_LOCAL => $this->lng->txt('mail_incoming_local'), IL_MAIL_EMAIL => $this->lng->txt('mail_incoming_smtp'), IL_MAIL_BOTH => $this->lng->txt('mail_incoming_both')); $si = new ilSelectInputGUI($this->lng->txt('mail_incoming'), 'mail_incoming_mail'); $si->setOptions($options); $this->ctrl->setParameterByClass('ilobjuserfoldergui', 'ref_id', USER_FOLDER_ID); $si->setInfo(sprintf($this->lng->txt('mail_settings_incoming_type_see_also'), $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'settings'))); $this->ctrl->clearParametersByClass('ilobjuserfoldergui'); $this->form->addItem($si); // noreply address $ti = new ilTextInputGUI($this->lng->txt('mail_external_sender_noreply'), 'mail_external_sender_noreply'); $ti->setInfo($this->lng->txt('info_mail_external_sender_noreply')); $ti->setMaxLength(255); $this->form->addItem($ti); $system_sender_name = new ilTextInputGUI($this->lng->txt('mail_system_sender_name'), 'mail_system_sender_name'); $system_sender_name->setInfo($this->lng->txt('mail_system_sender_name_info')); $system_sender_name->setMaxLength(255); $this->form->addItem($system_sender_name); $cb = new ilCheckboxInputGUI($this->lng->txt('mail_use_pear_mail'), 'pear_mail_enable'); $cb->setInfo($this->lng->txt('mail_use_pear_mail_info')); $cb->setValue(1); $this->form->addItem($cb); // prevent smtp mails $cb = new ilCheckboxInputGUI($this->lng->txt('mail_prevent_smtp_globally'), 'prevent_smtp_globally'); $cb->setValue(1); $this->form->addItem($cb); $cron_mail = new ilSelectInputGUI($this->lng->txt('cron_mail_notification'), 'mail_notification'); $cron_options = array(0 => $this->lng->txt('cron_mail_notification_never'), 1 => $this->lng->txt('cron_mail_notification_cron')); $cron_mail->setOptions($cron_options); $cron_mail->setInfo($this->lng->txt('cron_mail_notification_desc')); $this->form->addItem($cron_mail); // section header $sh = new ilFormSectionHeaderGUI(); $sh->setTitle($this->lng->txt('mail') . ' (' . $this->lng->txt('internal_system') . ')'); $this->form->addItem($sh); // max attachment size $ti = new ilNumberInputGUI($this->lng->txt('mail_maxsize_attach'), 'mail_maxsize_attach'); $ti->setSuffix($this->lng->txt('kb')); $ti->setInfo($this->lng->txt('mail_max_size_attachments_total')); $ti->setMaxLength(10); $ti->setSize(10); $this->form->addItem($ti); // Course/Group member notification $mn = new ilFormSectionHeaderGUI(); $mn->setTitle($this->lng->txt('mail_member_notification')); $this->form->addItem($mn); include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php"; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_MAIL, $this->form, $this); $this->form->addCommandButton('save', $this->lng->txt('save')); }
/** * @return ilPropertyFormGUI */ protected function getSettingsForm() { require_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings')); $form->setTitle($this->lng->txt('settings')); $frm_radio = new ilRadioGroupInputGUI($this->lng->txt('show_topics_overview'), 'forum_overview'); $frm_radio->addOption(new ilRadioOption($this->lng->txt('new') . ', ' . $this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '0')); $frm_radio->addOption(new ilRadioOption($this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '1')); $frm_radio->setInfo($this->lng->txt('topics_overview_info')); $form->addItem($frm_radio); $check = new ilCheckboxInputGui($this->lng->txt('enable_fora_statistics'), 'fora_statistics'); $check->setInfo($this->lng->txt('enable_fora_statistics_desc')); $form->addItem($check); $check = new ilCheckboxInputGui($this->lng->txt('enable_anonymous_fora'), 'anonymous_fora'); $check->setInfo($this->lng->txt('enable_anonymous_fora_desc')); $form->addItem($check); require_once 'Services/Cron/classes/class.ilCronManager.php'; if (ilCronManager::isJobActive('frm_notification')) { require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php'; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_FORUM, $form, $this); } else { $notifications = new ilCheckboxInputGui($this->lng->txt('cron_forum_notification'), 'forum_notification'); $notifications->setInfo($this->lng->txt('cron_forum_notification_desc')); $notifications->setValue(1); $form->addItem($notifications); } require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php'; $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym'); $cap->setInfo($this->lng->txt('adm_captcha_anonymous_frm')); $cap->setValue(1); if (!ilCaptchaUtil::checkFreetype()) { $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage()); } $form->addItem($cap); $form->addCommandButton('saveSettings', $this->lng->txt('save')); $form->addCommandButton('cancel', $this->lng->txt('cancel')); return $form; }
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')); $group_member->setSize(32); $group_member->setMaxLength(255); $this->form_gui->addItem($group_member); $group_member_isdn = new ilCheckboxInputGUI($this->lng->txt('ldap_memberisdn'), 'memberisdn'); #$group_member_isdn->setInfo($this->lng->txt('ldap_group_member_info')); $this->form_gui->addItem($group_member_isdn); #$group_member->addSubItem($group_member_isdn); $group = new ilTextInputGUI($this->lng->txt('ldap_group_name'), 'group'); $group->setInfo($this->lng->txt('ldap_group_name_info')); $group->setSize(32); $group->setMaxLength(255); $this->form_gui->addItem($group); $group_atrr = new ilTextInputGUI($this->lng->txt('ldap_group_attribute'), 'group_attribute'); $group_atrr->setInfo($this->lng->txt('ldap_group_attribute_info')); $group_atrr->setSize(16); $group_atrr->setMaxLength(64); $this->form_gui->addItem($group_atrr); $group_optional = new ilCheckboxInputGUI($this->lng->txt('ldap_group_membership'), 'group_optional'); $group_optional->setOptionTitle($this->lng->txt('ldap_group_member_optional')); $group_optional->setInfo($this->lng->txt('ldap_group_optional_info')); $group_optional->setValue(1); $group_user_filter = new ilTextInputGUI($this->lng->txt('ldap_group_user_filter'), 'group_user_filter'); $group_user_filter->setSize(64); $group_user_filter->setMaxLength(255); $group_optional->addSubItem($group_user_filter); $this->form_gui->addItem($group_optional); $section_sync = new ilFormSectionHeaderGUI(); $section_sync->setTitle($this->lng->txt('ldap_user_sync')); $this->form_gui->addItem($section_sync); $ci_gui = new ilCustomInputGUI($this->lng->txt('ldap_moment_sync')); $sync_on_login = new ilCheckboxInputGUI($this->lng->txt('ldap_sync_login'), 'sync_on_login'); $sync_on_login->setValue(1); $ci_gui->addSubItem($sync_on_login); $sync_per_cron = new ilCheckboxInputGUI($this->lng->txt('ldap_sync_cron'), 'sync_per_cron'); $sync_per_cron->setValue(1); $ci_gui->addSubItem($sync_per_cron); $ci_gui->setInfo($this->lng->txt('ldap_user_sync_info')); $this->form_gui->addItem($ci_gui); $global_role = new ilSelectInputGUI($this->lng->txt('ldap_global_role_assignment'), 'global_role'); $global_role->setOptions($this->prepareRoleSelect(false)); $global_role->setInfo($this->lng->txt('ldap_global_role_info')); $this->form_gui->addItem($global_role); $migr = new ilCheckboxInputGUI($this->lng->txt('auth_ldap_migration'), 'migration'); $migr->setInfo($this->lng->txt('auth_ldap_migration_info')); $migr->setValue(1); $this->form_gui->addItem($migr); include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php"; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_LDAP, $this->form_gui, ilAdministrationSettingsFormHandler::getSettingsGUIInstance("auth")); $this->form_gui->addCommandButton('save', $this->lng->txt('save')); }
/** * Edit personal workspace settings. */ public function editWsp() { global $ilCtrl, $lng, $ilSetting; include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this, "saveWsp")); $form->setTitle($lng->txt("pd_personal_workspace")); // Enable 'Personal Workspace' $wsp_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_personal_workspace'), 'wsp'); $wsp_prop->setValue('1'); $wsp_prop->setChecked($ilSetting->get('disable_personal_workspace') ? '0' : '1'); $form->addItem($wsp_prop); // Enable 'Blogs' $blog_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_blogs'), 'blog'); $blog_prop->setValue('1'); $blog_prop->setChecked($ilSetting->get('disable_wsp_blogs') ? '0' : '1'); $wsp_prop->addSubItem($blog_prop); // Enable 'Files' $file_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_files'), 'file'); $file_prop->setValue('1'); $file_prop->setChecked($ilSetting->get('disable_wsp_files') ? '0' : '1'); $wsp_prop->addSubItem($file_prop); // Enable 'Certificates' $cert_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_certificates'), 'cert'); $cert_prop->setValue('1'); $cert_prop->setChecked($ilSetting->get('disable_wsp_certificates') ? '0' : '1'); $wsp_prop->addSubItem($cert_prop); // Enable 'Links' $link_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_links'), 'link'); $link_prop->setValue('1'); $link_prop->setChecked($ilSetting->get('disable_wsp_links') ? '0' : '1'); $wsp_prop->addSubItem($link_prop); /* // Enable 'Portfolios' $lng->loadLanguageModule('user'); $prtf_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_prtf'), 'prtf'); $prtf_prop->setValue('1'); $prtf_prop->setInfo($lng->txt('user_portfolios_desc')); $prtf_prop->setChecked(($ilSetting->get('user_portfolios') ? '1' : '0')); $form->addItem($prtf_prop); */ // Load the disk quota settings object require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php'; $disk_quota_obj = ilObjDiskQuotaSettings::getInstance(); // Enable disk quota $lng->loadLanguageModule("file"); $cb_prop = new ilCheckboxInputGUI($lng->txt("personal_workspace_disk_quota"), "enable_personal_workspace_disk_quota"); $cb_prop->setValue('1'); $cb_prop->setChecked($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled()); $cb_prop->setInfo($lng->txt('enable_personal_workspace_disk_quota_info')); $form->addItem($cb_prop); require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php'; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_WSP, $form, $this); // command buttons $form->addCommandButton("saveWsp", $lng->txt("save")); $form->addCommandButton("editWsp", $lng->txt("cancel")); $this->tpl->setContent($form->getHTML()); }
/** * Edit disk quota settings. */ public function editDiskQuotaSettings() { global $rbacsystem, $ilErr, $ilSetting, $tpl, $lng, $ilCtrl; if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) { $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING); } $this->tabs_gui->setTabActive('disk_quota'); $this->addDiskQuotaSubtabs('settings'); require_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; require_once "./Services/Form/classes/class.ilCheckboxInputGUI.php"; require_once "./Services/Form/classes/class.ilRadioGroupInputGUI.php"; require_once "./Services/Form/classes/class.ilRadioOption.php"; require_once "./Services/Form/classes/class.ilTextAreaInputGUI.php"; require_once "./Services/WebDAV/classes/class.ilDAVServer.php"; $lng->loadLanguageModule("file"); $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this)); $form->setTitle($lng->txt("settings")); include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php"; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_FILES_QUOTA, $form, $this); /* // command buttons $form->addCommandButton('saveDiskQuotaSettings', $lng->txt('save')); $form->addCommandButton('editDiskQuotaSettings', $lng->txt('cancel')); */ $tpl->setContent($form->getHTML()); }
/** * Init settings property form * * @access protected */ protected function initFormSettings() { global $lng; $tags_set = new ilSetting("tags"); include_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt('tagging_settings')); $form->addCommandButton('saveSettings', $this->lng->txt('save')); $form->addCommandButton('cancel', $this->lng->txt('cancel')); // enable tagging $cb_prop = new ilCheckboxInputGUI($lng->txt("tagging_enable_tagging"), "enable_tagging"); $cb_prop->setValue("1"); $cb_prop->setChecked($tags_set->get("enable")); // enable all users info $cb_prop2 = new ilCheckboxInputGUI($lng->txt("tagging_enable_all_users"), "enable_all_users"); $cb_prop2->setInfo($lng->txt("tagging_enable_all_users_info")); $cb_prop2->setChecked($tags_set->get("enable_all_users")); $cb_prop->addSubItem($cb_prop2); $form->addItem($cb_prop); include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php"; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_TAGGING, $form, $this); $this->tpl->setContent($form->getHTML()); }
protected function initSettingsForm() { global $rbacsystem; include_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt('tracking_settings')); $activate = new ilCheckboxGroupInputGUI($this->lng->txt('activate_tracking')); $form->addItem($activate); // learning progress $lp = new ilCheckboxInputGUI($this->lng->txt('trac_learning_progress'), 'learning_progress_tracking'); if ($this->object->enabledLearningProgress()) { $lp->setChecked(true); } $activate->addSubItem($lp); // lp settings /* $desktop = new ilCheckboxInputGUI($this->lng->txt('trac_lp_on_personal_desktop'), 'lp_desktop'); $desktop->setInfo($this->lng->txt('trac_lp_on_personal_desktop_info')); $desktop->setChecked($this->object->hasLearningProgressDesktop()); $lp->addSubItem($desktop); */ $learner = new ilCheckboxInputGUI($this->lng->txt('trac_lp_learner_access'), 'lp_learner'); $learner->setInfo($this->lng->txt('trac_lp_learner_access_info')); $learner->setChecked($this->object->hasLearningProgressLearner()); $lp->addSubItem($learner); // extended data $extdata = new ilCheckboxGroupInputGUI($this->lng->txt('trac_learning_progress_settings_info'), 'lp_extdata'); $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_first_and_last_access'), 'lp_access')); $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_read_count'), 'lp_count')); $extdata->addOption(new ilCheckboxOption($this->lng->txt('trac_spent_seconds'), 'lp_spent')); $lp->addSubItem($extdata); $ext_value = array(); if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_LAST_ACCESS)) { $ext_value[] = 'lp_access'; } if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_READ_COUNT)) { $ext_value[] = 'lp_count'; } if ($this->object->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_SPENT_SECONDS)) { $ext_value[] = 'lp_spent'; } $extdata->setValue($ext_value); $listgui = new ilCheckboxInputGUI($this->lng->txt('trac_lp_list_gui'), 'lp_list'); $listgui->setInfo($this->lng->txt('trac_lp_list_gui_info')); $listgui->setChecked($this->object->hasLearningProgressListGUI()); $lp->addSubItem($listgui); /* => REPOSITORY // change event $event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking'); if($this->object->enabledChangeEventTracking()) { $event->setChecked(true); } $activate->addSubItem($event); */ // object statistics $objstat = new ilCheckboxInputGUI($this->lng->txt('trac_object_statistics'), 'object_statistics'); if ($this->object->enabledObjectStatistics()) { $objstat->setChecked(true); } $activate->addSubItem($objstat); // session statistics $sessstat = new ilCheckboxInputGUI($this->lng->txt('session_statistics'), 'session_statistics'); if ($this->object->enabledSessionStatistics()) { $sessstat->setChecked(true); } $activate->addSubItem($sessstat); // Anonymized $user = new ilCheckboxInputGUI($this->lng->txt('trac_anonymized'), 'user_related'); $user->setInfo($this->lng->txt('trac_anonymized_info')); $user->setChecked(!$this->object->enabledUserRelatedData()); $form->addItem($user); // Max time gap $valid = new ilNumberInputGUI($this->lng->txt('trac_valid_request'), 'valid_request'); $valid->setMaxLength(4); $valid->setSize(4); $valid->setSuffix($this->lng->txt('seconds')); $valid->setInfo($this->lng->txt('info_valid_request')); $valid->setValue($this->object->getValidTimeSpan()); $valid->setMinValue(1); $valid->setMaxValue(9999); $valid->setRequired(true); $form->addItem($valid); include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php"; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_LP, $form, $this); // #12259 if ($rbacsystem->checkAccess("write", $this->object->getRefId())) { $form->addCommandButton('saveSettings', $this->lng->txt('save')); } else { $lp->setDisabled(true); $learner->setDisabled(true); $extdata->setDisabled(true); $listgui->setDisabled(true); $objstat->setDisabled(true); $user->setDisabled(true); $valid->setDisabled(true); } return $form; }
protected function initFormSettings() { global $ilSetting; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings")); $form->setTitle($this->lng->txt("settings")); $this->addFieldsToForm($form); $this->lng->loadLanguageModule("mail"); // member notification $cn = new ilCheckboxInputGUI($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification'), 'mail_member_notification'); $cn->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification_info')); $cn->setChecked($ilSetting->get('mail_' . $this->getParentObjType() . '_member_notification', true)); $form->addItem($cn); ilAdministrationSettingsFormHandler::addFieldsToForm($this->getAdministrationFormId(), $form, $this); $form->addCommandButton("saveSettings", $this->lng->txt("save")); $form->addCommandButton("view", $this->lng->txt("cancel")); return $form; }
/** * Show Privacy settings * * @access public */ public function showSecurity() { global $ilSetting, $ilUser, $rbacreview; include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $security = ilSecuritySettings::_getInstance(); $this->tabs_gui->setTabActive('show_security'); $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt('ps_security_protection')); include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php"; ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_SECURITY, $form, $this); // $form->addCommandButton('save_security',$this->lng->txt('save')); $this->tpl->setContent($form->getHTML()); }