/** * init auth mode determinitation form * * @access protected */ protected function initAuthModeDetermination() { if (is_object($this->form)) { return true; } // Are there any authentication methods that support automatic determination ? include_once 'Services/Authentication/classes/class.ilAuthModeDetermination.php'; $det = ilAuthModeDetermination::_getInstance(); if ($det->getCountActiveAuthModes() <= 1) { return false; } include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; $this->form = new ilPropertyFormGUI(); $this->form->setFormAction($this->ctrl->getFormAction($this)); $this->form->setTableWidth('100%'); $this->form->setTitle($this->lng->txt('auth_auth_settings')); $this->form->addCommandButton('updateAuthModeDetermination', $this->lng->txt('save')); 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_auth')); $cap->setValue(1); if (!ilCaptchaUtil::checkFreetype()) { $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage()); } $cap->setChecked(ilCaptchaUtil::isActiveForLogin()); $this->form->addItem($cap); $header = new ilFormSectionHeaderGUI(); $header->setTitle($this->lng->txt('auth_auth_mode_determination')); $this->form->addItem($header); $kind = new ilRadioGroupInputGUI($this->lng->txt('auth_kind_determination'), 'kind'); $kind->setInfo($this->lng->txt('auth_mode_determination_info')); $kind->setValue($det->getKind()); $kind->setRequired(true); $option_user = new ilRadioOption($this->lng->txt('auth_by_user'), 0); $kind->addOption($option_user); $option_determination = new ilRadioOption($this->lng->txt('auth_automatic'), 1); include_once 'Services/Authentication/classes/class.ilAuthUtils.php'; $auth_sequenced = $det->getAuthModeSequence(); $counter = 1; foreach ($auth_sequenced as $auth_mode) { switch ($auth_mode) { case AUTH_LDAP: $text = $this->lng->txt('auth_ldap'); break; case AUTH_RADIUS: $text = $this->lng->txt('auth_radius'); break; case AUTH_LOCAL: $text = $this->lng->txt('auth_local'); break; case AUTH_SOAP: $text = $this->lng->txt('auth_soap'); break; case AUTH_APACHE: $text = $this->lng->txt('auth_apache'); break; // begin-patch auth_plugin // begin-patch auth_plugin default: foreach (ilAuthUtils::getAuthPlugins() as $pl) { $option = $pl->getMultipleAuthModeOptions($auth_mode); $text = $option[$auth_mode]['txt']; } break; // end-patch auth_plugin } $pos = new ilTextInputGUI($text, 'position[' . $auth_mode . ']'); $pos->setValue($counter++); $pos->setSize(1); $pos->setMaxLength(1); $option_determination->addSubItem($pos); } $kind->addOption($option_determination); $this->form->addItem($kind); return true; }
/** * @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; }
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('reg_settings_header')); $reg_type = new ilRadioGroupInputGUI($this->lng->txt('reg_type'), 'reg_type'); $reg_type->addOption(new ilRadioOption($this->lng->txt('reg_disabled'), IL_REG_DISABLED)); $option = new ilRadioOption($this->lng->txt('reg_direct'), IL_REG_DIRECT); $option->setInfo($this->lng->txt('reg_direct_info')); $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_DIRECT); $cd->setInfo($this->lng->txt('reg_allow_codes_info')); $option->addSubItem($cd); $reg_type->addOption($option); $option = new ilRadioOption($this->lng->txt('reg_approve'), IL_REG_APPROVE); $option->setInfo($this->lng->txt('reg_approve_info')); $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_APPROVE); $cd->setInfo($this->lng->txt('reg_allow_codes_info')); $option->addSubItem($cd); $reg_type->addOption($option); $option = new ilRadioOption($this->lng->txt('reg_type_confirmation'), IL_REG_ACTIVATION); $option->setInfo($this->lng->txt('reg_type_confirmation_info')); $lt = new ilNumberInputGUI($this->lng->txt('reg_confirmation_hash_life_time'), 'reg_hash_life_time'); $lt->setSize(5); $lt->setMaxLength(5); $lt->setMinValue(ilRegistrationSettings::REG_HASH_LIFETIME_MIN_VALUE); $lt->setRequired(true); $lt->setInfo($this->lng->txt('reg_confirmation_hash_life_time_info')); $lt->setSuffix($this->lng->txt('seconds')); $option->addSubItem($lt); $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_ACTIVATION); $cd->setInfo($this->lng->txt('reg_allow_codes_info')); $option->addSubItem($cd); $reg_type->addOption($option); $option = new ilRadioOption($this->lng->txt('registration_reg_type_codes'), IL_REG_CODES); $option->setInfo($this->lng->txt('registration_reg_type_codes_info')); $reg_type->addOption($option); $this->form_gui->addItem($reg_type); $pwd_gen = new ilCheckboxInputGUI($this->lng->txt('passwd_generation'), 'reg_pwd'); $pwd_gen->setValue(1); $pwd_gen->setInfo($this->lng->txt('reg_info_pwd')); $this->form_gui->addItem($pwd_gen); 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_reg')); $cap->setValue(1); if (!ilCaptchaUtil::checkFreetype()) { $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage()); } $this->form_gui->addItem($cap); $approver = new ilTextInputGUI($this->lng->txt('reg_notification'), 'reg_approver'); $approver->setSize(32); $approver->setMaxLength(50); $approver->setInfo($this->lng->txt('reg_notification_info')); $this->form_gui->addItem($approver); $roles = new ilRadioGroupInputGUI($this->lng->txt('reg_role_assignment'), 'reg_role_type'); $option = new ilRadioOption($this->lng->txt('reg_fixed'), IL_REG_ROLES_FIXED); $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles')); $edit = $this->ctrl->getLinkTarget($this, 'editRoles'); $list->setHtml($this->__parseRoleList($this->__prepareRoleList(), $edit)); $option->addSubItem($list); $roles->addOption($option); $option = new ilRadioOption($this->lng->txt('reg_email'), IL_REG_ROLES_EMAIL); $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles')); $edit = $this->ctrl->getLinkTarget($this, 'editEmailAssignments'); $list->setHtml($this->__parseRoleList($this->__prepareAutomaticRoleList(), $edit)); $option->addSubItem($list); $roles->addOption($option); $roles->setInfo($this->lng->txt('registration_codes_override_global_info')); $this->form_gui->addItem($roles); $limit = new ilCheckboxInputGUI($this->lng->txt('reg_access_limitations'), 'reg_access_limitation'); $limit->setValue(1); $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles')); $edit = $this->ctrl->getLinkTarget($this, 'editRoleAccessLimitations'); $list->setHtml($this->__parseRoleList($this->__prepareAccessLimitationRoleList(), $edit)); $list->setInfo($this->lng->txt('registration_codes_override_global_info')); $limit->addSubItem($list); $this->form_gui->addItem($limit); $domains = new ilTextInputGUI($this->lng->txt('reg_allowed_domains'), 'reg_allowed_domains'); $domains->setInfo($this->lng->txt('reg_allowed_domains_info')); $this->form_gui->addItem($domains); $this->form_gui->addCommandButton('save', $this->lng->txt('save')); }
/** * Init basic settings form. */ public function initBasicSettingsForm() { global $lng, $ilSetting; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); $lng->loadLanguageModule("pd"); // installation short title $ti = new ilTextInputGUI($this->lng->txt("short_inst_name"), "short_inst_name"); $ti->setMaxLength(200); $ti->setSize(40); $ti->setValue($ilSetting->get("short_inst_name")); $ti->setInfo($this->lng->txt("short_inst_name_info")); $this->form->addItem($ti); // public section $cb = new ilCheckboxInputGUI($this->lng->txt("pub_section"), "pub_section"); $cb->setInfo($lng->txt("pub_section_info")); if ($ilSetting->get("pub_section")) { $cb->setChecked(true); } // search engine include_once 'Services/PrivacySecurity/classes/class.ilRobotSettings.php'; $robot_settings = ilRobotSettings::_getInstance(); $cb2 = new ilCheckboxInputGUI($this->lng->txt("search_engine"), "open_google"); $cb2->setInfo($this->lng->txt("enable_search_engine")); $cb->addSubItem($cb2); if (!$robot_settings->checkModRewrite()) { $cb2->setAlert($lng->txt("mod_rewrite_disabled")); $cb2->setChecked(false); $cb2->setDisabled(true); } elseif (!$robot_settings->checkRewrite()) { $cb2->setAlert($lng->txt("allow_override_alert")); $cb2->setChecked(false); $cb2->setDisabled(true); } else { if ($ilSetting->get("open_google")) { $cb2->setChecked(true); } } // Enable Global Profiles $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_user_publish'), 'enable_global_profiles'); $cb_prop->setInfo($lng->txt('pd_enable_user_publish_info')); $cb_prop->setChecked($ilSetting->get('enable_global_profiles')); $cb->addSubItem($cb_prop); // activate captcha for anonymous wiki/forum editing include_once "./Services/Captcha/classes/class.ilCaptchaUtil.php"; $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_wiki_forum'), 'activate_captcha_anonym'); $cap->setValue(1); if (ilCaptchaUtil::checkFreetype()) { $cap->setChecked($ilSetting->get('activate_captcha_anonym')); } else { $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage()); } $cb->addSubItem($cap); $this->form->addItem($cb); // default repository view $options = array("flat" => $lng->txt("flatview"), "tree" => $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"); } $this->form->addItem($si); // $options = array("" => $lng->txt("adm_rep_tree_only_container"), "tree" => $lng->txt("adm_all_resource_types")); // repository tree $radg = new ilRadioGroupInputGUI($lng->txt("adm_rep_tree_presentation"), "tree_pres"); $radg->setValue($ilSetting->get("repository_tree_pres")); $op1 = new ilRadioOption($lng->txt("adm_rep_tree_only_cntr"), "", $lng->txt("adm_rep_tree_only_cntr_info")); $radg->addOption($op1); $op2 = new ilRadioOption($lng->txt("adm_rep_tree_all_types"), "all_types", $lng->txt("adm_rep_tree_all_types_info")); // limit tree in courses and groups $cb = new ilCheckboxInputGUI($lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs"); $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs")); $cb->setInfo($lng->txt("adm_rep_tree_limit_grp_crs_info")); $op2->addSubItem($cb); $radg->addOption($op2); $this->form->addItem($radg); $sdesc = new ilCheckboxInputGUI($lng->txt("adm_rep_shorten_description"), "rep_shorten_description"); $sdesc->setInfo($lng->txt("adm_rep_shorten_description_info")); $sdesc->setChecked($ilSetting->get("rep_shorten_description")); $this->form->addItem($sdesc); $sdesclen = new ilTextInputGUI($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); // synchronize repository tree with main view $cb = new ilCheckboxInputGUI($lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize"); $cb->setInfo($lng->txt("adm_synchronize_rep_tree_info")); $cb->setChecked($ilSetting->get("rep_tree_synchronize")); $this->form->addItem($cb); // 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")); $this->form->addItem($si);*/ // 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")); $this->form->addItem($cb); // locale $ti = new ilTextInputGUI($this->lng->txt("adm_locale"), "locale"); $ti->setMaxLength(80); $ti->setSize(40); $ti->setInfo($this->lng->txt("adm_locale_info")); $ti->setValue($ilSetting->get("locale")); $this->form->addItem($ti); // 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); } $this->form->addItem($cb); // BEGIN SESSION SETTINGS // create session handling radio group $ssettings = new ilRadioGroupInputGUI($this->lng->txt('sess_mode'), 'session_handling_type'); $ssettings->setValue($ilSetting->get('session_handling_type', ilSession::SESSION_HANDLING_FIXED)); // first option, fixed session duration $fixed = new ilRadioOption($this->lng->txt('sess_fixed_duration'), ilSession::SESSION_HANDLING_FIXED); // create session reminder subform $cb = new ilCheckboxInputGUI($this->lng->txt("session_reminder"), "session_reminder_enabled"); $expires = ilSession::getSessionExpireValue(); $time = ilFormat::_secondsToString($expires, true); $cb->setInfo($this->lng->txt("session_reminder_info") . "<br />" . sprintf($this->lng->txt('session_reminder_session_duration'), $time)); if ((int) $ilSetting->get("session_reminder_enabled")) { $cb->setChecked(true); } $fixed->addSubItem($cb); // add session handling to radio group $ssettings->addOption($fixed); // second option, session control $ldsh = new ilRadioOption($this->lng->txt('sess_load_dependent_session_handling'), ilSession::SESSION_HANDLING_LOAD_DEPENDENT); // add session control subform require_once 'Services/Authentication/classes/class.ilSessionControl.php'; // this is the max count of active sessions // that are getting started simlutanously $sub_ti = new ilTextInputGUI($this->lng->txt('session_max_count'), 'session_max_count'); $sub_ti->setMaxLength(5); $sub_ti->setSize(5); $sub_ti->setInfo($this->lng->txt('session_max_count_info')); $sub_ti->setValue($ilSetting->get("session_max_count", ilSessionControl::DEFAULT_MAX_COUNT)); if (!$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE)) { $sub_ti->setDisabled(true); } $ldsh->addSubItem($sub_ti); // after this (min) idle time the session can be deleted, // if there are further requests for new sessions, // but max session count is reached yet $sub_ti = new ilTextInputGUI($this->lng->txt('session_min_idle'), 'session_min_idle'); $sub_ti->setMaxLength(5); $sub_ti->setSize(5); $sub_ti->setInfo($this->lng->txt('session_min_idle_info')); $sub_ti->setValue($ilSetting->get("session_min_idle", ilSessionControl::DEFAULT_MIN_IDLE)); if (!$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE)) { $sub_ti->setDisabled(true); } $ldsh->addSubItem($sub_ti); // after this (max) idle timeout the session expires // and become invalid, so it is not considered anymore // when calculating current count of active sessions $sub_ti = new ilTextInputGUI($this->lng->txt('session_max_idle'), 'session_max_idle'); $sub_ti->setMaxLength(5); $sub_ti->setSize(5); $sub_ti->setInfo($this->lng->txt('session_max_idle_info')); $sub_ti->setValue($ilSetting->get("session_max_idle", ilSessionControl::DEFAULT_MAX_IDLE)); if (!$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE)) { $sub_ti->setDisabled(true); } $ldsh->addSubItem($sub_ti); // this is the max duration that can elapse between the first and the secnd // request to the system before the session is immidietly deleted $sub_ti = new ilTextInputGUI($this->lng->txt('session_max_idle_after_first_request'), 'session_max_idle_after_first_request'); $sub_ti->setMaxLength(5); $sub_ti->setSize(5); $sub_ti->setInfo($this->lng->txt('session_max_idle_after_first_request_info')); $sub_ti->setValue($ilSetting->get("session_max_idle_after_first_request", ilSessionControl::DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST)); if (!$ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE)) { $sub_ti->setDisabled(true); } $ldsh->addSubItem($sub_ti); // add session control to radio group $ssettings->addOption($ldsh); // add radio group to form if ($ilSetting->get('session_allow_client_maintenance', ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE)) { // just shows the status wether the session //setting maintenance is allowed by setup $this->form->addItem($ssettings); } else { // just shows the status wether the session //setting maintenance is allowed by setup $ti = new ilNonEditableValueGUI($this->lng->txt('session_config'), "session_config"); $ti->setValue($this->lng->txt('session_config_maintenance_disabled')); $ssettings->setDisabled(true); $ti->addSubItem($ssettings); $this->form->addItem($ti); } // END SESSION SETTINGS // password assistance $cb = new ilCheckboxInputGUI($this->lng->txt("enable_password_assistance"), "password_assistance"); if ($ilSetting->get("password_assistance")) { $cb->setChecked(true); } $cb->setInfo($this->lng->txt("password_assistance_info")); $this->form->addItem($cb); // password generation $cb = new ilCheckboxInputGUI($this->lng->txt("passwd_generation"), "passwd_auto_generate"); if ($ilSetting->get("passwd_auto_generate")) { $cb->setChecked(true); } $cb->setInfo($this->lng->txt("passwd_generation_info")); $this->form->addItem($cb); // dynamic web links $cb = new ilCheckboxInputGUI($this->lng->txt("links_dynamic"), "links_dynamic"); $cb->setInfo($this->lng->txt("links_dynamic_info")); if ($ilSetting->get("links_dynamic")) { $cb->setChecked(true); } $this->form->addItem($cb); // Learners View $pl = new ilCheckboxInputGUI($this->lng->txt('preview_learner'), 'preview_learner'); $pl->setValue(1); $pl->setInfo($this->lng->txt('preview_learner_info')); $pl->setChecked($ilSetting->get('preview_learner')); $this->form->addItem($pl); // 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')); $this->form->addItem($pl); // starting point include_once "Services/User/classes/class.ilUserUtil.php"; $si = new ilRadioGroupInputGUI($this->lng->txt("adm_user_starting_point"), "usr_start"); $si->setRequired(true); $si->setInfo($this->lng->txt("adm_user_starting_point_info")); foreach (ilUserUtil::getPossibleStartingPoints() as $value => $caption) { $si->addOption(new ilRadioOption($caption, $value)); } $si->setValue(ilUserUtil::getStartingPoint()); $this->form->addItem($si); // starting point: repository object $repobj = new ilRadioOption($lng->txt("adm_user_starting_point_object"), ilUserUtil::START_REPOSITORY_OBJ); $repobj_id = new ilTextInputGUI($lng->txt("adm_user_starting_point_ref_id"), "usr_start_ref_id"); $repobj_id->setRequired(true); $repobj_id->setSize(5); if ($si->getValue() == ilUserUtil::START_REPOSITORY_OBJ) { $start_ref_id = ilUserUtil::getStartingObject(); $repobj_id->setValue($start_ref_id); if ($start_ref_id) { $start_obj_id = ilObject::_lookupObjId($start_ref_id); if ($start_obj_id) { $repobj_id->setInfo($lng->txt("obj_" . ilObject::_lookupType($start_obj_id)) . ": " . ilObject::_lookupTitle($start_obj_id)); } } } $repobj->addSubItem($repobj_id); $si->addOption($repobj); // starting point: personal $startp = new ilCheckboxInputGUI($lng->txt("adm_user_starting_point_personal"), "usr_start_pers"); $startp->setInfo($lng->txt("adm_user_starting_point_personal_info")); $startp->setChecked(ilUserUtil::hasPersonalStartingPoint()); $si->addSubItem($startp); // save and cancel commands $this->form->addCommandButton("saveBasicSettings", $lng->txt("save")); $this->form->setTitle($lng->txt("basic_settings")); $this->form->setFormAction($this->ctrl->getFormAction($this)); }
/** * @param string $a_mode * @return ilPropertyFormGUI */ public function initForm($a_mode = "edit") { global $lng, $ilCtrl; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); 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_wiki')); $cap->setValue(1); if (!ilCaptchaUtil::checkFreetype()) { $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage()); } $form->addItem($cap); if ($this->checkPermissionBool("write")) { $form->addCommandButton("saveSettings", $lng->txt("save")); } $form->setTitle($lng->txt("settings")); $form->setFormAction($ilCtrl->getFormAction($this)); return $form; }