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 'illoginpagegui':
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/Authentication/classes/class.ilLoginPage.php");
109 include_once(
"./Services/Authentication/classes/class.ilLoginPageGUI.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(
'illoginpagegui',
"edit");
133 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
134 $page_gui->setLinkXML($link_xml);
140 $page_gui->setPresentationTitle(
"");
141 $page_gui->setTemplateOutput(
false);
143 $page_gui->setHeader(
"");
148 if($this->ctrl->getCmd() ==
'editPage')
149 $this->ctrl->setCmd(
'edit');
150 $html = $this->ctrl->forwardCommand($page_gui);
152 $tpl->setContent($html);
181 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
186 $ilToolbar->addButton(
187 $this->lng->txt(
'login_page_switch_ipe'),
188 $this->ctrl->getLinkTarget($this,
'switchIPE')
194 $ilToolbar->addButton(
195 $this->lng->txt(
'login_page_switch_rte'),
196 $this->ctrl->getLinkTarget($this,
'switchRTE')
212 $this->ctrl->redirect($this,
'show');
224 $this->ctrl->redirect($this,
'show');
233 foreach((array)
$_POST[
'visible_languages'] as $lang_key)
235 $settings->enableIliasEditor($lang_key, in_array($lang_key,(array)
$_POST[
'languages']));
240 $this->ctrl->redirect($this,
'show');
250 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorTableGUI.php';
254 $tpl->setContent($tbl->getHTML());
268 if(!$rbacsystem->checkAccess(
"visible,read", $this->getRefId()))
270 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
272 $lng->loadLanguageModule(
"meta");
274 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.auth_login_messages.html",
275 "Services/Authentication");
276 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
277 $tpl->setVariable(
"TXT_HEADLINE", $this->lng->txt(
"login_information"));
278 $tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"login_information_desc"));
279 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
281 $tpl->setVariable(
'LOGIN_INFO',$this->form->getHTML());
294 if(!$rbacsystem->checkAccess(
"write",$this->getRefId()))
296 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
300 if ($this->form->checkInput())
305 $this->loginSettings =
new ilSetting(
"login_settings");
307 foreach (
$_POST as $key => $val)
309 if (substr($key, 0, 14) ==
"login_message_")
311 $this->loginSettings->set($key, $val);
316 if(
$_POST[
'default_auth_mode'])
318 $ilSetting->set(
'default_auth_mode',(
int)
$_POST[
'default_auth_mode']);
324 $this->ctrl->redirect($this,
'show');
334 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
336 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveLoginInfo'));
337 $this->form->setTableWidth(
'80%');
338 $this->form->setTitle($this->lng->txt(
'login_information'));
340 $this->form->addCommandButton(
'saveLoginInfo',$this->lng->txt(
'save'));
342 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
343 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
347 $select =
new ilSelectInputGUI($this->lng->txt(
'default_auth_mode'),
'default_auth_mode');
349 $select->setInfo($this->lng->txt(
'default_auth_mode_info'));
355 if($rad_settings->isActive())
360 $this->form->addItem($select);
363 if (!is_object($this->loginSettings))
365 $this->loginSettings =
new ilSetting(
"login_settings");
368 $login_settings = $this->loginSettings->getAll();
369 $languages = $lng->getInstalledLanguages();
370 $def_language = $lng->getDefaultLanguage();
372 foreach ($this->
setDefLangFirst($def_language, $languages) as $lang_key)
375 if ($lang_key == $def_language)
377 $add =
" (".$lng->txt(
"default").
")";
381 'login_message_'.$lang_key);
383 $textarea->setValue($login_settings[
"login_message_".$lang_key]);
384 $textarea->setUseRte(
true);
385 $textarea->setRteTagSet(
"extended");
386 $this->form->addItem($textarea);
388 unset($login_settings[
"login_message_".$lang_key]);
391 foreach ($login_settings as $key => $message)
393 $lang_key = substr($key, strrpos($key,
"_") + 1, strlen($key) - strrpos($key,
"_"));
396 'login_message_'.$lang_key);
398 $textarea->setValue($message);
399 $textarea->setUseRte(
true);
400 $textarea->setRteTagSet(
"extended");
401 if(!in_array($lang_key,$languages))
403 $textarea->setAlert($lng->txt(
"not_installed"));
405 $this->form->addItem($textarea);
422 if (is_array($a_languages) && $a_def_language !=
"")
424 $languages = array();
425 $languages[] = $a_def_language;
427 foreach ($a_languages as $val)
429 if (!in_array($val, $languages))
Login page editor settings GUI ILIAS page editor or richtext editor.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _getFirstActiveServer()
Get first active server.
switchRTE()
Switch editor mode.
switchIPE()
Switch editor mode.
setDefLangFirst($a_def_language, $a_languages)
returns an array of all installed languages, default language at the first position ...
forwardToPageObject()
Forward to page editor.
initLoginForm()
Init login form.
getSyntaxStylePath()
get syntax style path
executeCommand()
ilCtrl execute command
if(!is_array($argv)) $options
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
static _getInstance()
singleton get instance
__construct($a_ref_id)
Constructor.
showIliasEditor()
Show ILIAS page editor summary.
getSettings()
Get Settings.
showRichtextEditor()
Show richtext editor ilRbacSystem $rbacsystem ilLanguage $lng ilSetting $ilSetting.
setRows($a_rows)
Set Rows.
getContentStylePath($a_style_id)
get content style path
saveLoginInfo()
saves the login information data
This class represents a text area property in a property form.
show()
Show current activated editor.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
static getInstance()
Get singelton instance.
activate()
Activate languages.
addEditorSwitch()
Show editore switch ilToolbarGUI $ilToolbar.