4 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
39 $this->lng->loadLanguageModule(
'auth');
40 $this->ref_id = $a_ref_id;
67 switch($this->ctrl->getNextClass($this))
69 case 'ilpageobjectgui':
72 $this->lng->txt(
'back'),
73 $this->ctrl->getLinkTarget($this,
'show'),
77 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui")
88 if(!
$cmd = $this->ctrl->getCmd())
106 $this->ctrl->saveParameter($this,
'key',$key);
108 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
109 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
110 include_once
'./Services/Style/classes/class.ilObjStyleSheet.php';
112 $lng->loadLanguageModule(
"content");
118 $new_page_object->setParentId($key);
119 $new_page_object->setId($key);
120 $new_page_object->createFromXML();
123 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
125 $tpl->setCurrentBlock(
"SyntaxStyle");
127 $tpl->parseCurrentBlock();
130 $this->ctrl->setReturnByClass(
'ilpageobjectgui',
"edit");
133 $page_gui->setIntLinkHelpDefault(
"RepositoryItem",$key);
134 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
135 $page_gui->setLinkXML($link_xml);
141 $page_gui->setPresentationTitle(
"");
142 $page_gui->setTemplateOutput(
false);
144 $page_gui->setHeader(
"");
145 $page_gui->setEnabledRepositoryObjects(
true);
146 $page_gui->setEnabledLoginPage(
true);
147 $page_gui->setEnabledFileLists(
false);
148 $page_gui->setEnabledMaps(
true);
149 $page_gui->setEnabledPCTabs(
true);
150 $page_gui->setEnabledInternalLinks(
true);
155 if($this->ctrl->getCmd() ==
'editPage')
156 $this->ctrl->setCmd(
'edit');
157 $html = $this->ctrl->forwardCommand($page_gui);
159 $tpl->setContent($html);
188 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
193 $ilToolbar->addButton(
194 $this->lng->txt(
'login_page_switch_ipe'),
195 $this->ctrl->getLinkTarget($this,
'switchIPE')
201 $ilToolbar->addButton(
202 $this->lng->txt(
'login_page_switch_rte'),
203 $this->ctrl->getLinkTarget($this,
'switchRTE')
219 $this->ctrl->redirect($this,
'show');
231 $this->ctrl->redirect($this,
'show');
240 foreach((array)
$_POST[
'visible_languages'] as $lang_key)
242 $settings->enableIliasEditor($lang_key, in_array($lang_key,(array)
$_POST[
'languages']));
247 $this->ctrl->redirect($this,
'show');
257 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorTableGUI.php';
261 $tpl->setContent($tbl->getHTML());
275 if(!$rbacsystem->checkAccess(
"visible,read", $this->getRefId()))
277 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
279 $lng->loadLanguageModule(
"meta");
281 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.auth_login_messages.html",
282 "Services/Authentication");
283 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
284 $tpl->setVariable(
"TXT_HEADLINE", $this->lng->txt(
"login_information"));
285 $tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"login_information_desc"));
286 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
288 $tpl->setVariable(
'LOGIN_INFO',$this->form->getHTML());
301 if(!$rbacsystem->checkAccess(
"write",$this->getRefId()))
303 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
307 if ($this->form->checkInput())
312 $this->loginSettings =
new ilSetting(
"login_settings");
314 foreach (
$_POST as $key => $val)
316 if (substr($key, 0, 14) ==
"login_message_")
318 $this->loginSettings->set($key, $val);
323 if(
$_POST[
'default_auth_mode'])
325 $ilSetting->set(
'default_auth_mode',(
int)
$_POST[
'default_auth_mode']);
331 $this->ctrl->redirect($this,
'show');
341 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
343 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveLoginInfo'));
344 $this->form->setTableWidth(
'80%');
345 $this->form->setTitle($this->lng->txt(
'login_information'));
347 $this->form->addCommandButton(
'saveLoginInfo',$this->lng->txt(
'save'));
349 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
350 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
354 $select =
new ilSelectInputGUI($this->lng->txt(
'default_auth_mode'),
'default_auth_mode');
356 $select->setInfo($this->lng->txt(
'default_auth_mode_info'));
357 $options[
AUTH_LOCAL] = $this->lng->txt(
'auth_local');
360 $options[
AUTH_LDAP] = $this->lng->txt(
'auth_ldap');
362 if($rad_settings->isActive())
364 $options [
AUTH_RADIUS] = $this->lng->txt(
'auth_radius');
366 $select->setOptions($options);
367 $this->form->addItem($select);
370 if (!is_object($this->loginSettings))
372 $this->loginSettings =
new ilSetting(
"login_settings");
375 $login_settings = $this->loginSettings->getAll();
376 $languages = $lng->getInstalledLanguages();
377 $def_language = $lng->getDefaultLanguage();
379 foreach ($this->
setDefLangFirst($def_language, $languages) as $lang_key)
382 if ($lang_key == $def_language)
384 $add =
" (".$lng->txt(
"default").
")";
388 'login_message_'.$lang_key);
390 $textarea->setValue($login_settings[
"login_message_".$lang_key]);
391 $textarea->setUseRte(
true);
392 $textarea->setRteTagSet(
"extended");
393 $this->form->addItem($textarea);
395 unset($login_settings[
"login_message_".$lang_key]);
398 foreach ($login_settings as $key => $message)
400 $lang_key = substr($key, strrpos($key,
"_") + 1, strlen($key) - strrpos($key,
"_"));
403 'login_message_'.$lang_key);
405 $textarea->setValue($message);
406 $textarea->setUseRte(
true);
407 $textarea->setRteTagSet(
"extended");
408 if(!in_array($lang_key,$languages))
410 $textarea->setAlert($lng->txt(
"not_installed"));
412 $this->form->addItem($textarea);
429 if (is_array($a_languages) && $a_def_language !=
"")
431 $languages = array();
432 $languages[] = $a_def_language;
434 foreach ($a_languages as $val)
436 if (!in_array($val, $languages))