/** * Init configuration form. * * @return object form object */ public function initConfigurationForm() { global $lng, $ilCtrl, $ilDB; $pl = $this->getPluginObject(); $this->getPluginObject()->includeClass('class.ilOpenmeetingsConfig.php'); $this->object = ilOpenmeetingsConfig::getInstance(); include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); $this->form->setTitle($pl->txt("openmeetings_plugin_configuration")); $this->form->setFormAction($ilCtrl->getFormAction($this)); $this->form->addCommandButton("save", $lng->txt("save")); // url (text) $ti = new ilTextInputGUI($pl->txt("url"), "frmurl"); $ti->setRequired(true); $ti->setMaxLength(256); $ti->setSize(60); $this->form->addItem($ti); // port (text) $ti = new ilTextInputGUI($pl->txt("port"), "frmport"); $ti->setRequired(true); $ti->setMaxLength(10); $ti->setSize(10); $this->form->addItem($ti); // appname $ti = new ilTextInputGUI($pl->txt("appname"), "frmappname"); $ti->setRequired(true); $ti->setMaxLength(32); $ti->setSize(20); $this->form->addItem($ti); // username (text) $ti = new ilTextInputGUI($pl->txt("username"), "frmusername"); $ti->setRequired(true); $ti->setMaxLength(256); $ti->setSize(20); $this->form->addItem($ti); // password (text) $ti = new ilPasswordInputGUI($pl->txt("password"), "frmpassword"); $ti->setRequired(true); $ti->setMaxLength(256); $ti->setSize(20); $ti->setRetype(false); $this->form->addItem($ti); foreach ($this->fields as $key => $item) { $field = new $item["type"]($this->plugin_object->txt('conf_' . $key), $key); $field->setInfo($this->plugin_object->txt($item["info"])); if (is_array($item["subelements"])) { foreach ($item["subelements"] as $subkey => $subitem) { $subfield = new $subitem["type"]($this->plugin_object->txt('conf_' . $key . "_" . $subkey), $subkey); $subfield->setInfo($this->plugin_object->txt($subitem["info"])); $field->addSubItem($subfield); } } $this->form->addItem($field); } return $this->form; }
private function showPasswordFormCmd() { require_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; require_once 'Services/Form/classes/class.ilPasswordInputGUI.php'; $form = new ilPropertyFormGUI(); $form->setTitle($this->lng->txt("tst_password_form")); $form->setDescription($this->lng->txt("tst_password_introduction")); $form->setFormAction($this->ctrl->getFormAction($this)); $form->addCommandButton(self::CMD_SAVE_ENTERED_PASSWORD, $this->lng->txt("submit")); $form->addCommandButton(self::CMD_BACK_TO_INFO_SCREEN, $this->lng->txt("cancel")); $inp = new ilPasswordInputGUI($this->lng->txt("tst_password"), 'password'); $inp->setRequired(true); $inp->setRetype(false); $form->addItem($inp); $this->tpl->setVariable($this->parentGUI->getContentBlockName(), $this->ctrl->getHTML($form)); }
protected function initPasswordForm() { global $ilCtrl, $lng, $ilUser, $ilTabs; if ($this->node_id) { include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php"; $object_data = ilWorkspaceAccessHandler::getObjectDataFromNode($this->node_id); } else { $object_data["title"] = ilObject::_lookupTitle($this->portfolio_id); } include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this, "checkPassword")); $form->setTitle($lng->txt("wsp_password_for") . ": " . $object_data["title"]); $password = new ilPasswordInputGUI($lng->txt("password"), "password"); $password->setRetype(false); $password->setRequired(true); $form->addItem($password); $form->addCommandButton("checkPassword", $lng->txt("submit")); if ($ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID) { $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, "cancelPassword")); $form->addCommandButton("cancelPassword", $lng->txt("cancel")); } return $form; }
/** * init edit/create category form * * @access protected * @return */ protected function initFormCategory($a_mode) { global $rbacsystem, $ilUser; include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; include_once './Services/Calendar/classes/class.ilCalendarCategory.php'; include_once './Services/Calendar/classes/class.ilCalendarCategories.php'; $cat_info = ilCalendarCategories::_getInstance()->getCategoryInfo((int) $_GET['category_id']); $this->form = new ilPropertyFormGUI(); #$this->form->setTableWidth('40%'); switch ($a_mode) { case 'edit': $category = new ilCalendarCategory((int) $_GET['category_id']); $this->form->setTitle($this->lng->txt('cal_edit_category')); $this->ctrl->saveParameter($this, array('seed', 'category_id')); $this->form->setFormAction($this->ctrl->getFormAction($this)); if ($this->isEditable()) { $this->form->addCommandButton('update', $this->lng->txt('save')); /* if($cat_info['type'] == ilCalendarCategory::TYPE_USR) { $this->form->addCommandButton('shareSearch',$this->lng->txt('cal_share')); } $this->form->addCommandButton('confirmDelete',$this->lng->txt('delete')); */ $this->form->addCommandButton('manage', $this->lng->txt('cancel')); } break; case 'create': $this->editable = true; $category = new ilCalendarCategory(0); $this->ctrl->saveParameter($this, array('category_id')); $this->form->setFormAction($this->ctrl->getFormAction($this)); $this->form->setTitle($this->lng->txt('cal_add_category')); $this->form->addCommandButton('save', $this->lng->txt('save')); $this->form->addCommandButton('manage', $this->lng->txt('cancel')); break; } // Calendar name $title = new ilTextInputGUI($this->lng->txt('cal_calendar_name'), 'title'); if ($a_mode == 'edit') { $title->setDisabled(!$this->isEditable()); } $title->setRequired(true); $title->setMaxLength(64); $title->setSize(32); $title->setValue($category->getTitle()); $this->form->addItem($title); include_once './Services/Calendar/classes/class.ilCalendarSettings.php'; if ($a_mode == 'create' and $rbacsystem->checkAccess('edit_event', ilCalendarSettings::_getInstance()->getCalendarSettingsId())) { $type = new ilRadioGroupInputGUI($this->lng->txt('cal_cal_type'), 'type'); $type->setValue($category->getType()); $type->setRequired(true); $opt = new ilRadioOption($this->lng->txt('cal_type_personal'), ilCalendarCategory::TYPE_USR); $type->addOption($opt); $opt = new ilRadioOption($this->lng->txt('cal_type_system'), ilCalendarCategory::TYPE_GLOBAL); $type->addOption($opt); $type->setInfo($this->lng->txt('cal_type_info')); $this->form->addItem($type); } $color = new ilColorPickerInputGUI($this->lng->txt('cal_calendar_color'), 'color'); $color->setValue($category->getColor()); if (!$this->isEditable()) { $color->setDisabled(true); } $color->setRequired(true); $this->form->addItem($color); $location = new ilRadioGroupInputGUI($this->lng->txt('cal_type_rl'), 'type_rl'); $location->setDisabled($a_mode == 'edit'); $location_local = new ilRadioOption($this->lng->txt('cal_type_local'), ilCalendarCategory::LTYPE_LOCAL); $location->addOption($location_local); $location_remote = new ilRadioOption($this->lng->txt('cal_type_remote'), ilCalendarCategory::LTYPE_REMOTE); $location->addOption($location_remote); $location->setValue($category->getLocationType()); $url = new ilTextInputGUI($this->lng->txt('cal_remote_url'), 'remote_url'); $url->setDisabled($a_mode == 'edit'); $url->setValue($category->getRemoteUrl()); $url->setMaxLength(500); $url->setSize(60); $url->setRequired(true); $location_remote->addSubItem($url); $user = new ilTextInputGUI($this->lng->txt('username'), 'remote_user'); $user->setDisabled($a_mode == 'edit'); $user->setValue($category->getRemoteUser()); $user->setMaxLength(50); $user->setSize(20); $user->setRequired(false); $location_remote->addSubItem($user); $pass = new ilPasswordInputGUI($this->lng->txt('password'), 'remote_pass'); $pass->setDisabled($a_mode == 'edit'); $pass->setValue($category->getRemotePass()); $pass->setMaxLength(50); $pass->setSize(20); $pass->setRetype(false); $pass->setInfo($this->lng->txt('remote_pass_info')); $location_remote->addSubItem($pass); $this->form->addItem($location); }
protected function initPasswordForm($a_node_id) { global $ilCtrl, $lng; $this->ctrl->setParameter($this, "item_ref_id", $a_node_id); $object_data = $this->getAccessHandler()->getObjectDataFromNode($a_node_id); include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this, "checkPassword")); $form->setTitle($lng->txt("wsp_password_for") . ": " . $object_data["title"]); $password = new ilPasswordInputGUI($lng->txt("password"), "password"); $password->setRetype(false); $password->setRequired(true); $password->setSkipSyntaxCheck(true); $form->addItem($password); $form->addCommandButton("checkPassword", $lng->txt("submit")); $form->addCommandButton("share", $lng->txt("cancel")); return $form; }
/** * init settings form * * @access protected */ protected function initSettingsForm($a_mode = 'update') { if (is_object($this->form)) { return true; } include_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $this->form = new ilPropertyFormGUI(); $this->form->setFormAction($this->ctrl->getFormAction($this, 'settings')); $this->form->setTitle($this->lng->txt('ecs_connection_settings')); $ena = new ilCheckboxInputGUI($this->lng->txt('ecs_active'), 'active'); $ena->setChecked($this->settings->isEnabled()); $ena->setValue(1); $this->form->addItem($ena); $ser = new ilTextInputGUI($this->lng->txt('ecs_server_url'), 'server'); $ser->setValue((string) $this->settings->getServer()); $ser->setRequired(true); $this->form->addItem($ser); $pro = new ilSelectInputGUI($this->lng->txt('ecs_protocol'), 'protocol'); // fixed to https #$pro->setOptions(array(ilECSSetting::PROTOCOL_HTTP => $this->lng->txt('http'), # ilECSSetting::PROTOCOL_HTTPS => $this->lng->txt('https'))); $pro->setOptions(array(ilECSSetting::PROTOCOL_HTTPS => 'HTTPS')); $pro->setValue($this->settings->getProtocol()); $pro->setRequired(true); $this->form->addItem($pro); $por = new ilTextInputGUI($this->lng->txt('ecs_port'), 'port'); $por->setSize(5); $por->setMaxLength(5); $por->setValue((string) $this->settings->getPort()); $por->setRequired(true); $this->form->addItem($por); $tcer = new ilRadioGroupInputGUI($this->lng->txt('ecs_auth_type'), 'auth_type'); $tcer->setValue($this->settings->getAuthType()); $this->form->addItem($tcer); // Certificate based authentication $cert_based = new ilRadioOption($this->lng->txt('ecs_auth_type_cert'), ilECSSetting::AUTH_CERTIFICATE); $tcer->addOption($cert_based); $cli = new ilTextInputGUI($this->lng->txt('ecs_client_cert'), 'client_cert'); $cli->setSize(60); $cli->setValue((string) $this->settings->getClientCertPath()); $cli->setRequired(true); $cert_based->addSubItem($cli); $key = new ilTextInputGUI($this->lng->txt('ecs_cert_key'), 'key_path'); $key->setSize(60); $key->setValue((string) $this->settings->getKeyPath()); $key->setRequired(true); $cert_based->addSubItem($key); $cerp = new ilTextInputGUI($this->lng->txt('ecs_key_password'), 'key_password'); $cerp->setSize(12); $cerp->setValue((string) $this->settings->getKeyPassword()); $cerp->setInputType('password'); $cerp->setRequired(true); $cert_based->addSubItem($cerp); $cer = new ilTextInputGUI($this->lng->txt('ecs_ca_cert'), 'ca_cert'); $cer->setSize(60); $cer->setValue((string) $this->settings->getCACertPath()); $cer->setRequired(true); $cert_based->addSubItem($cer); // Apache auth $apa_based = new ilRadioOption($this->lng->txt('ecs_auth_type_apache'), ilECSSetting::AUTH_APACHE); $tcer->addOption($apa_based); $user = new ilTextInputGUI($this->lng->txt('ecs_apache_user'), 'auth_user'); $user->setSize(32); $user->setValue((string) $this->settings->getAuthUser()); $user->setRequired(true); $apa_based->addSubItem($user); $pass = new ilPasswordInputGUI($this->lng->txt('ecs_apache_pass'), 'auth_pass'); $pass->setRetype(false); $pass->setSize(16); $pass->setMaxLength(32); $pass->setValue((string) $this->settings->getAuthPass()); $pass->setRequired(true); $apa_based->addSubItem($pass); $ser = new ilNonEditableValueGUI($this->lng->txt('cert_serial')); $ser->setValue($this->settings->getCertSerialNumber() ? $this->settings->getCertSerialNumber() : $this->lng->txt('ecs_no_value')); $cert_based->addSubItem($ser); $loc = new ilFormSectionHeaderGUI(); $loc->setTitle($this->lng->txt('ecs_local_settings')); $this->form->addItem($loc); $pol = new ilDurationInputGUI($this->lng->txt('ecs_polling'), 'polling'); $pol->setShowDays(false); $pol->setShowHours(false); $pol->setShowMinutes(true); $pol->setShowSeconds(true); $pol->setSeconds($this->settings->getPollingTimeSeconds()); $pol->setMinutes($this->settings->getPollingTimeMinutes()); $pol->setRequired(true); $pol->setInfo($this->lng->txt('ecs_polling_info')); $this->form->addItem($pol); $imp = new ilCustomInputGUI($this->lng->txt('ecs_import_id')); $imp->setRequired(true); $tpl = new ilTemplate('tpl.ecs_import_id_form.html', true, true, 'Services/WebServices/ECS'); $tpl->setVariable('SIZE', 5); $tpl->setVariable('MAXLENGTH', 11); $tpl->setVariable('POST_VAR', 'import_id'); $tpl->setVariable('PROPERTY_VALUE', $this->settings->getImportId()); if ($this->settings->getImportId()) { $tpl->setVariable('COMPLETE_PATH', $this->buildPath($this->settings->getImportId())); } $imp->setHTML($tpl->get()); $imp->setInfo($this->lng->txt('ecs_import_id_info')); $this->form->addItem($imp); $loc = new ilFormSectionHeaderGUI(); $loc->setTitle($this->lng->txt('ecs_remote_user_settings')); $this->form->addItem($loc); $role = new ilSelectInputGUI($this->lng->txt('ecs_role'), 'global_role'); $role->setOptions($this->prepareRoleSelect()); $role->setValue($this->settings->getGlobalRole()); $role->setInfo($this->lng->txt('ecs_global_role_info')); $role->setRequired(true); $this->form->addItem($role); $duration = new ilDurationInputGUI($this->lng->txt('ecs_account_duration'), 'duration'); $duration->setInfo($this->lng->txt('ecs_account_duration_info')); $duration->setMonths($this->settings->getDuration()); $duration->setShowSeconds(false); $duration->setShowMinutes(false); $duration->setShowHours(false); $duration->setShowDays(false); $duration->setShowMonths(true); $duration->setRequired(true); $this->form->addItem($duration); // Email recipients $loc = new ilFormSectionHeaderGUI(); $loc->setTitle($this->lng->txt('ecs_notifications')); $this->form->addItem($loc); $rcp_user = new ilTextInputGUI($this->lng->txt('ecs_user_rcp'), 'user_recipients'); $rcp_user->setValue((string) $this->settings->getUserRecipientsAsString()); $rcp_user->setInfo($this->lng->txt('ecs_user_rcp_info')); $this->form->addItem($rcp_user); $rcp_econ = new ilTextInputGUI($this->lng->txt('ecs_econ_rcp'), 'econtent_recipients'); $rcp_econ->setValue((string) $this->settings->getEContentRecipientsAsString()); $rcp_econ->setInfo($this->lng->txt('ecs_econ_rcp_info')); $this->form->addItem($rcp_econ); $rcp_app = new ilTextInputGUI($this->lng->txt('ecs_approval_rcp'), 'approval_recipients'); $rcp_app->setValue((string) $this->settings->getApprovalRecipientsAsString()); $rcp_app->setInfo($this->lng->txt('ecs_approval_rcp_info')); $this->form->addItem($rcp_app); if ($a_mode == 'update') { $this->form->addCommandButton('update', $this->lng->txt('save')); } else { $this->form->addCommandButton('save', $this->lng->txt('save')); } $this->form->addCommandButton('overview', $this->lng->txt('cancel')); }
/** * Role Mapping Tab * @global ilToolbarGUI $ilToolbar */ public function roleMapping() { global $ilToolbar; $this->setSubTabs(); $this->tabs_gui->setSubTabActive('ldap_role_mapping'); $ilToolbar->addButton($this->lng->txt("ldap_new_role_assignment"), $this->ctrl->getLinkTarget($this, 'addRoleMapping')); include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; //Set propertyform for synchronization settings include_once "./Services/Form/classes/class.ilCombinationInputGUI.php"; $propertie_form = new ilPropertyFormGUI(); $propertie_form->setTitle($this->lng->txt('ldap_role_settings')); $propertie_form->setFormAction($this->ctrl->getFormAction($this, "saveSyncronizationSettings")); $propertie_form->addCommandButton("saveSyncronizationSettings", $this->lng->txt('save')); $role_active = new ilCheckboxInputGUI($this->lng->txt('ldap_role_active')); $role_active->setPostVar('role_sync_active'); $role_active->setChecked($this->server->enabledRoleSynchronization() ? true : false); $propertie_form->addItem($role_active); $binding = new ilCombinationInputGUI($this->lng->txt('ldap_server_binding')); $binding->setInfo($this->lng->txt('ldap_role_bind_user_info')); $user = new ilTextInputGUI(""); $user->setPostVar("role_bind_user"); $user->setValue($this->server->getRoleBindDN()); $user->setSize(50); $user->setMaxLength(255); $binding->addCombinationItem(0, $user, $this->lng->txt('ldap_role_bind_user')); $pass = new ilPasswordInputGUI(""); $pass->setPostVar("role_bind_pass"); $pass->setValue($this->server->getRoleBindPassword()); $pass->setSize(12); $pass->setMaxLength(36); $pass->setRetype(false); $binding->addCombinationItem(1, $pass, $this->lng->txt('ldap_role_bind_pass')); $propertie_form->addItem($binding); $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.ldap_role_mappings.html', 'Services/LDAP'); $this->tpl->setVariable("NEW_ASSIGNMENT_TBL", $propertie_form->getHTML()); //Set Group Assignments Table if mappings exist include_once 'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php'; $mapping_instance = ilLDAPRoleGroupMappingSettings::_getInstanceByServerId($this->server->getServerId()); $mappings = $mapping_instance->getMappings(); if (count($mappings)) { include_once "./Services/LDAP/classes/class.ilLDAPRoleMappingTableGUI.php"; $table_gui = new ilLDAPRoleMappingTableGUI($this, $this->server->getServerId(), "roleMapping"); $table_gui->setTitle($this->lng->txt('ldap_role_group_assignments')); $table_gui->setData($mappings); $this->tpl->setVariable("RULES_TBL", $table_gui->getHTML()); } }
/** * Init master login form. */ public function initMasterLoginForm() { global $lng, $ilCtrl; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); // password $pi = new ilPasswordInputGUI($lng->txt("password"), "mpassword"); $pi->setSize(20); $pi->setRetype(false); $pi->setSkipSyntaxCheck(true); $this->form->addItem($pi); $this->form->addCommandButton("performMLogin", $lng->txt("login")); $this->form->setTitle($lng->txt("admin_login")); $this->form->setFormAction("setup.php?cmd=gateway"); }
/** * Show account migration screen * @param string $a_message */ public function showAccountMigration($a_message = '') { /** * @var $tpl ilTemplate * @var $lng ilLanguage */ global $tpl, $lng; $lng->loadLanguageModule('auth'); self::initStartUpTemplate('tpl.login_account_migration.html'); include_once 'Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, 'migrateAccount')); $form->setTitle($lng->txt('auth_account_migration')); $form->addCommandButton('migrateAccount', $lng->txt('save')); $form->addCommandButton('showLogin', $lng->txt('cancel')); $rad = new ilRadioGroupInputGUI($lng->txt('auth_account_migration_name'), 'account_migration'); $rad->setValue(1); $keep = new ilRadioOption($lng->txt('auth_account_migration_keep'), 1, $lng->txt('auth_info_migrate')); $user = new ilTextInputGUI($lng->txt('login'), 'mig_username'); $user->setRequired(true); $user->setValue(ilUtil::prepareFormOutput($_POST['mig_username'])); $user->setSize(32); $user->setMaxLength(128); $keep->addSubItem($user); $pass = new ilPasswordInputGUI($lng->txt('password'), 'mig_password'); $pass->setRetype(false); $pass->setRequired(true); $pass->setValue(ilUtil::prepareFormOutput($_POST['mig_password'])); $pass->setSize(12); $pass->setMaxLength(128); $keep->addSubItem($pass); $rad->addOption($keep); $new = new ilRadioOption($lng->txt('auth_account_migration_new'), 2, $lng->txt('auth_info_add')); $rad->addOption($new); $form->addItem($rad); $tpl->setVariable('MIG_FORM', $form->getHTML()); if (strlen($a_message)) { ilUtil::sendFailure($a_message); } $tpl->show('DEFAULT'); }
/** * Init password form. * * @param int $a_mode Edit Mode */ public function initPasswordForm() { global $lng, $ilUser, $ilSetting; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); // Check whether password change is allowed if ($this->allowPasswordChange()) { // The current password needs to be checked for verification // unless the user uses Shibboleth authentication with additional // local authentication for WebDAV. //if ( // ($ilUser->getAuthMode(true) != AUTH_SHIBBOLETH || !$ilSetting->get("shib_auth_allow_local")) //) if ($ilUser->getAuthMode(true) == AUTH_LOCAL) { // current password $cpass = new ilPasswordInputGUI($lng->txt("current_password"), "current_password"); $cpass->setRetype(false); $cpass->setSkipSyntaxCheck(true); // only if a password exists. if ($ilUser->getPasswd()) { $cpass->setRequired(true); } $this->form->addItem($cpass); } // new password $ipass = new ilPasswordInputGUI($lng->txt("desired_password"), "new_password"); $ipass->setRequired(true); $ipass->setInfo(ilUtil::getPasswordRequirementsInfo()); if ($ilSetting->get("passwd_auto_generate") == 1) { $ipass->setPreSelection(true); $this->form->addItem($ipass); $this->form->addCommandButton("savePassword", $lng->txt("save")); $this->form->addCommandButton("showPassword", $lng->txt("new_list_password")); } else { $this->form->addItem($ipass); $this->form->addCommandButton("savePassword", $lng->txt("save")); } switch ($ilUser->getAuthMode(true)) { case AUTH_LOCAL: $this->form->setTitle($lng->txt("chg_password")); break; case AUTH_SHIBBOLETH: case AUTH_CAS: require_once 'Services/WebDAV/classes/class.ilDAVServer.php'; if (ilDAVServer::_isActive()) { $this->form->setTitle($lng->txt("chg_ilias_and_webfolder_password")); } else { $this->form->setTitle($lng->txt("chg_ilias_password")); } break; default: $this->form->setTitle($lng->txt("chg_ilias_password")); break; } $this->form->setFormAction($this->ctrl->getFormAction($this)); } }
/** * Init configuration form. * * @return object form object */ public function initConfigurationForm() { global $lng, $ilCtrl; $pl = $this->getPluginObject(); $this->getPluginObject()->includeClass('class.ilViteroSettings.php'); $settings = ilViteroSettings::getInstance(); include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setTitle($this->getPluginObject()->txt('vitero_plugin_configuration')); $form->setFormAction($ilCtrl->getFormAction($this)); $form->addCommandButton('save', $lng->txt('save')); $form->setShowTopButtons(false); // Server url $uri = new ilTextInputGUI($this->getPluginObject()->txt('server_uri'), 'server_uri'); $uri->setRequired(true); $uri->setSize(80); $uri->setMaxLength(512); $uri->setValue($settings->getServerUrl()); $form->addItem($uri); // Admin user $admin = new ilTextInputGUI($this->getPluginObject()->txt('admin_user'), 'admin_user'); $admin->setRequired(true); $admin->setSize(16); $admin->setMaxLength(128); $admin->setValue($settings->getAdminUser()); $form->addItem($admin); // Admin pass $pass = new ilPasswordInputGUI($this->getPluginObject()->txt('admin_pass'), 'admin_pass'); $pass->setSkipSyntaxCheck(true); //$pass->setRequired(true); $pass->setRetype(true); $pass->setSize(12); $pass->setMaxLength(32); //$pass->setValue($settings->getAdminPass()); $form->addItem($pass); // Customer id $cid = new ilNumberInputGUI($this->getPluginObject()->txt('customer_id'), 'customer'); $cid->setSize(3); $cid->setMaxLength(9); $cid->setRequired(true); $cid->setMinValue(1); $cid->setValue($settings->getCustomer()); $form->addItem($cid); // Webstart $ws = new ilTextInputGUI($this->getPluginObject()->txt('webstart_url'), 'webstart'); $ws->setRequired(true); $ws->setSize(80); $ws->setMaxLength(512); $ws->setValue($settings->getWebstartUrl()); $form->addItem($ws); // Client Section $client = new ilFormSectionHeaderGUI(); $client->setTitle($this->getPluginObject()->txt('client_settings')); $form->addItem($client); // cafe $cafe = new ilCheckboxInputGUI($this->getPluginObject()->txt('cafe_setting'), 'cafe'); $cafe->setInfo($this->getPluginObject()->txt('cafe_setting_info')); $cafe->setValue(1); $cafe->setChecked($settings->isCafeEnabled()); $form->addItem($cafe); // content $content = new ilCheckboxInputGUI($this->getPluginObject()->txt('content_admin'), 'content'); $content->setInfo($this->getPluginObject()->txt('content_admin_info')); $content->setValue(1); $content->setChecked($settings->isContentAdministrationEnabled()); $form->addItem($content); // Standard room $standard = new ilCheckboxInputGUI($this->getPluginObject()->txt('standard_room'), 'std_room'); $standard->setInfo($this->getPluginObject()->txt('standard_room_info')); $standard->setValue(1); $standard->setChecked($settings->isStandardRoomEnabled()); $form->addItem($standard); // ldap $ldap = new ilCheckboxInputGUI($this->getPluginObject()->txt('ldap_setting'), 'ldap'); $ldap->setInfo($this->getPluginObject()->txt('ldap_setting_info')); $ldap->setValue(1); $ldap->setChecked($settings->isLdapUsed()); #$form->addItem($ldap); // userprefix $prefix = new ilTextInputGUI($this->getPluginObject()->txt('uprefix'), 'uprefix'); $prefix->setInfo($this->getPluginObject()->txt('uprefix_info')); $prefix->setSize(6); $prefix->setMaxLength(16); $prefix->setValue($settings->getUserPrefix()); $form->addItem($prefix); // avatar $ava = new ilCheckboxInputGUI($this->getPluginObject()->txt('avatar'), 'avatar'); $ava->setValue(1); $ava->setChecked($settings->isAvatarEnabled()); $ava->setInfo($this->getPluginObject()->txt('avatar_info')); $form->addItem($ava); /* if(!class_exists('WSMessage')) { $ava->setDisabled(true); $ava->setAlert($this->getPluginObject()->txt('avatar_warning')); } $cert = new ilTextInputGUI($this->getPluginObject()->txt('mtom_cert'),'mtom_cert'); $cert->setValue($settings->getMTOMCert()); $cert->setSize(100); $cert->setMaxLength(512); $cert->setInfo($this->getPluginObject()->txt('mtom_cert_info')); if(!class_exists('WSMessage')) { $cert->setDisabled(true); } $ava->addSubItem($cert); */ // grace period before $gpb = new ilSelectInputGUI($this->getPluginObject()->txt('std_grace_period_before'), 'grace_period_before'); $gpb->setInfo($this->getPluginObject()->txt('std_grace_period_before_info')); $gpb->setOptions(array(0 => '0 min', 15 => '15 min', 30 => '30 min', 45 => '45 min', 60 => '1 h')); $gpb->setValue($settings->getStandardGracePeriodBefore()); $form->addItem($gpb); // grace period after $gpa = new ilSelectInputGUI($this->getPluginObject()->txt('std_grace_period_after'), 'grace_period_after'); $gpa->setInfo($this->getPluginObject()->txt('std_grace_period_after_info')); $gpa->setOptions(array(0 => '0 min', 15 => '15 min', 30 => '30 min', 45 => '45 min', 60 => '1 h')); $gpa->setValue($settings->getStandardGracePeriodAfter()); $form->addItem($gpa); return $form; }
/** * Show account migration screen * * @access public * @param * */ public function showAccountMigration($a_message = '') { global $tpl, $lng; $lng->loadLanguageModule('auth'); $tpl->addBlockFile("CONTENT", "content", "tpl.startup_screen.html", "Services/Init"); $tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.png")); $tpl->addBlockFile("STARTUP_CONTENT", "startup_content", "tpl.login_account_migration.html", "Services/Init"); include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, 'migrateAccount')); $form->setTitle($lng->txt('auth_account_migration')); $form->addCommandButton('migrateAccount', $lng->txt('save')); $form->addCommandButton('showLogin', $lng->txt('cancel')); $rad = new ilRadioGroupInputGUI($lng->txt('auth_account_migration_name'), 'account_migration'); $rad->setValue(1); $keep = new ilRadioOption($lng->txt('auth_account_migration_keep'), 1, $lng->txt('auth_info_migrate')); $user = new ilTextInputGUI($lng->txt('login'), 'mig_username'); $user->setValue(ilUtil::prepareFormOutput($_POST['mig_username'])); $user->setSize(32); $user->setMaxLength(128); $keep->addSubItem($user); $pass = new ilPasswordInputGUI($lng->txt('password'), 'mig_password'); $pass->setValue(ilUtil::prepareFormOutput($_POST['mig_password'])); $pass->setRetype(false); $pass->setSize(12); $pass->setMaxLength(128); $keep->addSubItem($pass); $rad->addOption($keep); $new = new ilRadioOption($lng->txt('auth_account_migration_new'), 2, $lng->txt('auth_info_add')); $rad->addOption($new); $form->addItem($rad); $tpl->setVariable('MIG_FORM', $form->getHTML()); if (strlen($a_message)) { $this->showFailure($a_message); } $tpl->show('DEFAULT'); }
/** * ilPropertyFormGUI initialisation * * @access private */ private function initAdobeSettingsForm() { /** * @var $ilCtrl ilCtrl * @var $lng $lng */ global $lng, $ilCtrl; include_once './Services/Form/classes/class.ilPropertyFormGUI.php'; require_once './Services/Authentication/classes/class.ilAuthUtils.php'; $this->tabs->setTabActive('editAdobeSettings'); $this->form = new ilPropertyFormGUI(); $this->form->setFormAction($ilCtrl->getFormAction($this, 'saveAdobeSettings')); $this->form->setTitle($this->getPluginObject()->txt('adobe_settings')); $this->form->addCommandButton('saveAdobeSettings', $lng->txt('save')); $this->form->addCommandButton('cancelAdobeSettings', $lng->txt('cancel')); $form_server = new ilTextInputGUI($lng->txt('server'), 'server'); $form_server->setRequired(true); $form_server->setInfo($this->getPluginObject()->txt('xavc_host_info')); $this->form->addItem($form_server); $form_port = new ilNumberInputGUI($lng->txt('port'), 'port'); $form_port->setSize(5); $form_port->setMaxLength(5); $form_port->setInfo($this->getPluginObject()->txt('xavc_port_info')); $this->form->addItem($form_port); $form_login = new ilTextInputGUI($lng->txt('login'), 'login'); $form_login->setRequired(true); $this->form->addItem($form_login); $form_passwd = new ilPasswordInputGUI($lng->txt('password'), 'password'); $form_passwd->setRequired(true); $form_passwd->setRetype(false); $this->form->addItem($form_passwd); //Address to SWITCH Cave Server $form_cave = new ilTextInputGUI($this->getPluginObject()->txt('cave'), 'cave'); $form_cave->setRequired(true); // you can choose the mode for the creation of user-accounts at AdobeServer: the AC-Loginname could be the users-email-address or the ilias-loginname $radio_group = new ilRadioGroupInputGUI($this->getPluginObject()->txt('user_assignment_mode'), 'user_assignment_mode'); $radio_option_1 = new ilRadioOption($this->getPluginObject()->txt('assign_users_with_email'), 'assign_user_email'); $radio_group->addOption($radio_option_1); $radio_option_2 = new ilRadioOption($this->getPluginObject()->txt('assign_users_with_ilias_login'), 'assign_ilias_login'); $radio_group->addOption($radio_option_2); $radio_option_3 = new ilRadioOption($this->getPluginObject()->txt('assign_users_with_switch_aai_login'), 'assign_breezeSession'); $radio_option_3->addSubItem($form_cave); $radio_group->addOption($radio_option_3); $radio_group->setInfo($this->getPluginObject()->txt('assignment_info')); $radio_option_4 = new ilRadioOption($this->getPluginObject()->txt('assign_users_with_email_dfn'), 'assign_dfn_email'); $radio_group->addOption($radio_option_4); if (ilAdobeConnectServer::getSetting('user_assignment_mode') != NULL) { $radio_group->setDisabled(true); } $this->form->addItem($radio_group); $auth_radio_grp = new ilRadioGroupInputGUI($this->getPluginObject()->txt('auth_mode'), 'auth_mode'); $auth_radio_opt_1 = new ilRadioOption($this->getPluginObject()->txt('auth_mode_password'), 'auth_mode_password'); $auth_radio_grp->addOption($auth_radio_opt_1); $auth_radio_opt_2 = new ilRadioOption($this->getPluginObject()->txt('auth_mode_header'), 'auth_mode_header'); $form_x_user_id = new ilTextInputGUI($this->getPluginObject()->txt('x_user_id_header_var'), 'x_user_id'); $form_x_user_id->setInfo($this->getPluginObject()->txt('xavc_x_user_id_info')); $auth_radio_opt_2->addSubItem($form_x_user_id); $auth_radio_grp->addOption($auth_radio_opt_2); $auth_radio_opt_3 = new ilRadioOption($this->getPluginObject()->txt('auth_mode_switchaai'), 'auth_mode_switchaai'); $switchaai_checkbox_grp = new ilCheckboxGroupInputGUI($this->getPluginObject()->txt('auth_mode_switchaai_accounts'), 'auth_mode_switchaai_account_type'); $switchaai_checkbox_grp->addOption(new ilCheckboxOption($this->getPluginObject()->txt('auth_mode_switchaai_local'), AUTH_LOCAL)); $switchaai_checkbox_grp->addOption(new ilCheckboxOption($this->getPluginObject()->txt('auth_mode_switchaai_ldap'), AUTH_LDAP)); $auth_radio_opt_3->addSubItem($switchaai_checkbox_grp); $auth_radio_grp->addOption($auth_radio_opt_3); $form_auth_mode_dfn = new ilRadioOption($this->getPluginObject()->txt('auth_mode_dfn'), 'auth_mode_dfn'); $auth_radio_grp->addOption($form_auth_mode_dfn); $auth_radio_grp->setInfo($this->getPluginObject()->txt('authentification_mode_info')); $this->form->addItem($auth_radio_grp); $form_lead_time = new ilNumberInputGUI($this->getPluginObject()->txt('schedule_lead_time'), 'schedule_lead_time'); $form_lead_time->setDecimals(0); $form_lead_time->setMinValue(0); $form_lead_time->setRequired(true); $form_lead_time->setSize(5); $form_lead_time->setInfo($this->getPluginObject()->txt('schedule_lead_time_info')); $this->form->addItem($form_lead_time); $head_line = new ilFormSectionHeaderGUI(); $head_line->setTitle($this->getPluginObject()->txt('presentation_server_settings')); $this->form->addItem($head_line); $form_fe_server = new ilTextInputGUI($this->getPluginObject()->txt('presentation_server'), 'presentation_server'); $form_fe_server->setRequired(true); $form_fe_server->setInfo($this->getPluginObject()->txt('xavc_presentation_host_info')); $this->form->addItem($form_fe_server); $form_fe_port = new ilNumberInputGUI($this->getPluginObject()->txt('presentation_port'), 'presentation_port'); $form_fe_port->setSize(5); $form_fe_port->setMaxLength(5); $form_fe_port->setInfo($this->getPluginObject()->txt('xavc_presentation_port_info')); $this->form->addItem($form_fe_port); }