4include_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)) {
68 case 'illoginpagegui':
71 $this->lng->txt(
'back'),
72 $this->ctrl->getLinkTarget($this,
'show'),
76 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui") {
84 if (!$cmd = $this->ctrl->getCmd()) {
100 $key = (int) $_REQUEST[
'key'];
101 $this->ctrl->saveParameter($this,
'key',
$key);
103 include_once(
"./Services/Authentication/classes/class.ilLoginPage.php");
104 include_once(
"./Services/Authentication/classes/class.ilLoginPageGUI.php");
105 include_once
'./Services/Style/Content/classes/class.ilObjStyleSheet.php';
107 $lng->loadLanguageModule(
"content");
112 $new_page_object->setParentId(
$key);
113 $new_page_object->setId(
$key);
114 $new_page_object->createFromXML();
117 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
119 $tpl->setCurrentBlock(
"SyntaxStyle");
121 $tpl->parseCurrentBlock();
124 $this->ctrl->setReturnByClass(
'illoginpagegui',
"edit");
127 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
128 $page_gui->setLinkXML($link_xml);
134 $page_gui->setPresentationTitle(
"");
136 $page_gui->setTemplateOutput(
false);
138 $page_gui->setHeader(
"");
143 if ($this->ctrl->getCmd() ==
'editPage') {
144 $this->ctrl->setCmd(
'edit');
146 $html = $this->ctrl->forwardCommand($page_gui);
176 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
180 $ilToolbar->addButton(
181 $this->lng->txt(
'login_page_switch_ipe'),
182 $this->ctrl->getLinkTarget($this,
'switchIPE')
188 $ilToolbar->addButton(
189 $this->lng->txt(
'login_page_switch_rte'),
190 $this->ctrl->getLinkTarget($this,
'switchRTE')
206 $this->ctrl->redirect($this,
'show');
218 $this->ctrl->redirect($this,
'show');
227 foreach ((array)
$_POST[
'visible_languages'] as $lang_key) {
228 $settings->enableIliasEditor($lang_key, in_array($lang_key, (array)
$_POST[
'languages']));
233 $this->ctrl->redirect($this,
'show');
243 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorTableGUI.php';
261 if (!$rbacsystem->checkAccess(
"visible,read", $this->getRefId())) {
262 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
264 $lng->loadLanguageModule(
"meta");
269 "tpl.auth_login_messages.html",
270 "Services/Authentication"
272 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
273 $tpl->setVariable(
"TXT_HEADLINE", $this->lng->txt(
"login_information"));
274 $tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"login_information_desc"));
275 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
277 $tpl->setVariable(
'LOGIN_INFO', $this->form->getHTML());
290 if (!$rbacsystem->checkAccess(
"write", $this->getRefId())) {
291 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
295 if ($this->form->checkInput()) {
298 $this->loginSettings =
new ilSetting(
"login_settings");
301 if (substr(
$key, 0, 14) ==
"login_message_") {
302 $this->loginSettings->set(
$key, $val);
307 if (
$_POST[
'default_auth_mode']) {
314 $this->ctrl->redirect($this,
'show');
324 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
326 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveLoginInfo'));
327 $this->form->setTableWidth(
'80%');
328 $this->form->setTitle($this->lng->txt(
'login_information'));
330 $this->form->addCommandButton(
'saveLoginInfo', $this->lng->txt(
'save'));
332 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
333 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
336 $select =
new ilSelectInputGUI($this->lng->txt(
'default_auth_mode'),
'default_auth_mode');
338 $select->setInfo($this->lng->txt(
'default_auth_mode_info'));
343 if ($rad_settings->isActive()) {
347 $this->form->addItem($select);
350 if (!is_object($this->loginSettings)) {
351 $this->loginSettings =
new ilSetting(
"login_settings");
354 $login_settings = $this->loginSettings->getAll();
355 $languages =
$lng->getInstalledLanguages();
356 $def_language =
$lng->getDefaultLanguage();
358 foreach ($this->
setDefLangFirst($def_language, $languages) as $lang_key) {
360 if ($lang_key == $def_language) {
361 $add =
" (" .
$lng->txt(
"default") .
")";
365 $lng->txt(
"meta_l_" . $lang_key) . $add,
366 'login_message_' . $lang_key
368 $textarea->setRows(10);
369 $textarea->setValue($login_settings[
"login_message_" . $lang_key]);
370 $textarea->setUseRte(
true);
371 $textarea->setRteTagSet(
"extended");
372 $this->form->addItem($textarea);
374 unset($login_settings[
"login_message_" . $lang_key]);
378 $lang_key = substr(
$key, strrpos(
$key,
"_") + 1, strlen(
$key) - strrpos(
$key,
"_"));
381 $lng->txt(
"meta_l_" . $lang_key) . $add,
382 'login_message_' . $lang_key
384 $textarea->setRows(10);
386 $textarea->setUseRte(
true);
387 $textarea->setRteTagSet(
"extended");
388 if (!in_array($lang_key, $languages)) {
389 $textarea->setAlert(
$lng->txt(
"not_installed"));
391 $this->form->addItem($textarea);
408 if (is_array($a_languages) && $a_def_language !=
"") {
409 $languages = array();
410 $languages[] = $a_def_language;
412 foreach ($a_languages as $val) {
413 if (!in_array($val, $languages)) {
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
Login page editor settings GUI ILIAS page editor or richtext editor.
showIliasEditor()
Show ILIAS page editor summary.
addEditorSwitch()
Show editore switch @global ilToolbarGUI $ilToolbar.
switchIPE()
Switch editor mode.
showRichtextEditor()
Show richtext editor @global ilRbacSystem $rbacsystem @global ilLanguage $lng @global ilSetting $ilSe...
show()
Show current activated editor.
switchRTE()
Switch editor mode.
executeCommand()
ilCtrl execute command
initLoginForm()
Init login form.
setDefLangFirst($a_def_language, $a_languages)
returns an array of all installed languages, default language at the first position
activate()
Activate languages.
getSettings()
Get Settings.
__construct($a_ref_id)
Constructor.
saveLoginInfo()
saves the login information data
forwardToPageObject()
Forward to page editor.
static getInstance()
Get singelton instance.
static _getFirstActiveServer()
Get first active server.
static getSyntaxStylePath()
get syntax style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static _getInstance()
singleton get instance
This class represents a text area property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
catch(Exception $e) $message