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())
105 $key = (int) $_REQUEST[
'key'];
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/Content/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/Content/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(
"");
142 $page_gui->setTemplateOutput(
false);
144 $page_gui->setHeader(
"");
149 if($this->ctrl->getCmd() ==
'editPage')
150 $this->ctrl->setCmd(
'edit');
151 $html = $this->ctrl->forwardCommand($page_gui);
153 $tpl->setContent(
$html);
182 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
187 $ilToolbar->addButton(
188 $this->lng->txt(
'login_page_switch_ipe'),
189 $this->ctrl->getLinkTarget($this,
'switchIPE')
195 $ilToolbar->addButton(
196 $this->lng->txt(
'login_page_switch_rte'),
197 $this->ctrl->getLinkTarget($this,
'switchRTE')
213 $this->ctrl->redirect($this,
'show');
225 $this->ctrl->redirect($this,
'show');
234 foreach((
array)
$_POST[
'visible_languages'] as $lang_key)
241 $this->ctrl->redirect($this,
'show');
251 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorTableGUI.php';
255 $tpl->setContent(
$tbl->getHTML());
269 if(!$rbacsystem->checkAccess(
"visible,read", $this->getRefId()))
271 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
273 $lng->loadLanguageModule(
"meta");
275 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.auth_login_messages.html",
276 "Services/Authentication");
277 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
278 $tpl->setVariable(
"TXT_HEADLINE", $this->lng->txt(
"login_information"));
279 $tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"login_information_desc"));
280 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
282 $tpl->setVariable(
'LOGIN_INFO',$this->form->getHTML());
295 if(!$rbacsystem->checkAccess(
"write",$this->getRefId()))
297 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
301 if ($this->form->checkInput())
306 $this->loginSettings =
new ilSetting(
"login_settings");
308 foreach (
$_POST as $key => $val)
310 if (substr($key, 0, 14) ==
"login_message_")
312 $this->loginSettings->set($key, $val);
317 if(
$_POST[
'default_auth_mode'])
319 $ilSetting->set(
'default_auth_mode',(
int)
$_POST[
'default_auth_mode']);
325 $this->ctrl->redirect($this,
'show');
335 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
337 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveLoginInfo'));
338 $this->form->setTableWidth(
'80%');
339 $this->form->setTitle($this->lng->txt(
'login_information'));
341 $this->form->addCommandButton(
'saveLoginInfo',$this->lng->txt(
'save'));
343 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
344 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
348 $select =
new ilSelectInputGUI($this->lng->txt(
'default_auth_mode'),
'default_auth_mode');
350 $select->setInfo($this->lng->txt(
'default_auth_mode_info'));
356 if($rad_settings->isActive())
361 $this->form->addItem($select);
364 if (!is_object($this->loginSettings))
366 $this->loginSettings =
new ilSetting(
"login_settings");
369 $login_settings = $this->loginSettings->getAll();
371 $def_language = $lng->getDefaultLanguage();
376 if ($lang_key == $def_language)
378 $add =
" (".$lng->txt(
"default").
")";
382 'login_message_'.$lang_key);
384 $textarea->setValue($login_settings[
"login_message_".$lang_key]);
385 $textarea->setUseRte(
true);
386 $textarea->setRteTagSet(
"extended");
387 $this->form->addItem($textarea);
389 unset($login_settings[
"login_message_".$lang_key]);
392 foreach ($login_settings as $key => $message)
394 $lang_key = substr($key, strrpos($key,
"_") + 1, strlen($key) - strrpos($key,
"_"));
397 'login_message_'.$lang_key);
399 $textarea->setValue($message);
400 $textarea->setUseRte(
true);
401 $textarea->setRteTagSet(
"extended");
404 $textarea->setAlert($lng->txt(
"not_installed"));
406 $this->form->addItem($textarea);
423 if (is_array($a_languages) && $a_def_language !=
"")
428 foreach ($a_languages as $val)
Login page editor settings GUI ILIAS page editor or richtext editor.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
executeCommand()
ilCtrl execute command
if(!is_array($argv)) $options
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static _getInstance()
singleton get instance
__construct($a_ref_id)
Constructor.
static getSyntaxStylePath()
get syntax style path
showIliasEditor()
Show ILIAS page editor summary.
Create styles array
The data for the language used.
getSettings()
Get Settings.
static getContentStylePath($a_style_id)
get content style path
showRichtextEditor()
Show richtext editor ilRbacSystem $rbacsystem ilLanguage $lng ilSetting $ilSetting.
setRows($a_rows)
Set Rows.
saveLoginInfo()
saves the login information data
This class represents a text area property in a property form.
show()
Show current activated editor.
static getInstance()
Get singelton instance.
activate()
Activate languages.
addEditorSwitch()
Show editore switch ilToolbarGUI $ilToolbar.