4include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
37 $ilCtrl =
$DIC[
'ilCtrl'];
40 $this->ctrl = $ilCtrl;
42 $this->lng->loadLanguageModule(
'auth');
43 $this->ref_id = $a_ref_id;
70 switch ($this->ctrl->getNextClass($this)) {
71 case 'illoginpagegui':
72 $GLOBALS[
'DIC'][
'ilTabs']->clearTargets();
73 $GLOBALS[
'DIC'][
'ilTabs']->setBackTarget(
74 $this->lng->txt(
'back'),
75 $this->ctrl->getLinkTarget($this,
'show'),
79 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui") {
87 if (!$cmd = $this->ctrl->getCmd()) {
106 $key = (int) $_REQUEST[
'key'];
107 $this->ctrl->saveParameter($this,
'key', $key);
109 include_once(
"./Services/Authentication/classes/class.ilLoginPage.php");
110 include_once(
"./Services/Authentication/classes/class.ilLoginPageGUI.php");
111 include_once
'./Services/Style/Content/classes/class.ilObjStyleSheet.php';
113 $lng->loadLanguageModule(
"content");
118 $new_page_object->setParentId($key);
119 $new_page_object->setId($key);
120 $new_page_object->createFromXML();
127 $this->ctrl->setReturnByClass(
'illoginpagegui',
"edit");
130 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
131 $page_gui->setLinkXML($link_xml);
137 $page_gui->setPresentationTitle(
"");
139 $page_gui->setTemplateOutput(
false);
141 $page_gui->setHeader(
"");
146 if ($this->ctrl->getCmd() ==
'editPage') {
147 $this->ctrl->setCmd(
'edit');
149 $html = $this->ctrl->forwardCommand($page_gui);
152 $tpl->setContent($html);
181 $ilToolbar =
$DIC[
'ilToolbar'];
183 $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')
212 ilUtil::sendSuccess($this->lng->txt(
'login_page_editor_switched'),
true);
213 $this->ctrl->redirect($this,
'show');
224 ilUtil::sendSuccess($this->lng->txt(
'login_page_editor_switched'),
true);
225 $this->ctrl->redirect($this,
'show');
234 foreach ((array)
$_POST[
'visible_languages'] as $lang_key) {
235 $settings->enableIliasEditor($lang_key, in_array($lang_key, (array)
$_POST[
'languages']));
239 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
240 $this->ctrl->redirect($this,
'show');
252 include_once
'./Services/Authentication/classes/class.ilAuthLoginPageEditorTableGUI.php';
256 $tpl->setContent($tbl->getHTML());
270 $rbacsystem =
$DIC[
'rbacsystem'];
275 if (!$rbacsystem->checkAccess(
"visible,read", $this->getRefId())) {
276 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
278 $lng->loadLanguageModule(
"meta");
283 "tpl.auth_login_messages.html",
284 "Services/Authentication"
286 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
287 $tpl->setVariable(
"TXT_HEADLINE", $this->lng->txt(
"login_information"));
288 $tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"login_information_desc"));
289 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
291 $tpl->setVariable(
'LOGIN_INFO', $this->form->getHTML());
304 $rbacsystem =
$DIC[
'rbacsystem'];
308 if (!$rbacsystem->checkAccess(
"write", $this->getRefId())) {
309 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
313 if ($this->form->checkInput()) {
316 $this->loginSettings =
new ilSetting(
"login_settings");
318 foreach (
$_POST as $key => $val) {
319 if (substr($key, 0, 14) ==
"login_message_") {
320 $this->loginSettings->set($key, $val);
325 if (
$_POST[
'default_auth_mode']) {
329 ilUtil::sendSuccess($this->lng->txt(
"login_information_settings_saved"),
true);
332 $this->ctrl->redirect($this,
'show');
342 $rbacsystem =
$DIC[
'rbacsystem'];
346 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
348 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveLoginInfo'));
349 $this->form->setTableWidth(
'80%');
350 $this->form->setTitle($this->lng->txt(
'login_information'));
352 $this->form->addCommandButton(
'saveLoginInfo', $this->lng->txt(
'save'));
354 include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
355 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
358 $select =
new ilSelectInputGUI($this->lng->txt(
'default_auth_mode'),
'default_auth_mode');
360 $select->setInfo($this->lng->txt(
'default_auth_mode_info'));
361 $options[
AUTH_LOCAL] = $this->lng->txt(
'auth_local');
363 $options[
AUTH_LDAP] = $this->lng->txt(
'auth_ldap');
365 if ($rad_settings->isActive()) {
366 $options [
AUTH_RADIUS] = $this->lng->txt(
'auth_radius');
368 $select->setOptions($options);
369 $this->form->addItem($select);
372 if (!is_object($this->loginSettings)) {
373 $this->loginSettings =
new ilSetting(
"login_settings");
376 $login_settings = $this->loginSettings->getAll();
377 $languages =
$lng->getInstalledLanguages();
378 $def_language =
$lng->getDefaultLanguage();
380 foreach ($this->
setDefLangFirst($def_language, $languages) as $lang_key) {
382 if ($lang_key == $def_language) {
383 $add =
" (" .
$lng->txt(
"default") .
")";
387 $lng->txt(
"meta_l_" . $lang_key) . $add,
388 'login_message_' . $lang_key
390 $textarea->setRows(10);
391 $textarea->setValue($login_settings[
"login_message_" . $lang_key]);
392 $textarea->setUseRte(
true);
393 $textarea->setRteTagSet(
"extended");
394 $this->form->addItem($textarea);
396 unset($login_settings[
"login_message_" . $lang_key]);
399 foreach ($login_settings as $key =>
$message) {
400 $lang_key = substr($key, strrpos($key,
"_") + 1, strlen($key) - strrpos($key,
"_"));
403 $lng->txt(
"meta_l_" . $lang_key) . $add,
404 'login_message_' . $lang_key
406 $textarea->setRows(10);
408 $textarea->setUseRte(
true);
409 $textarea->setRteTagSet(
"extended");
410 if (!in_array($lang_key, $languages)) {
411 $textarea->setAlert(
$lng->txt(
"not_installed"));
413 $this->form->addItem($textarea);
430 if (is_array($a_languages) && $a_def_language !=
"") {
431 $languages = array();
432 $languages[] = $a_def_language;
434 foreach ($a_languages as $val) {
435 if (!in_array($val, $languages)) {
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
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, $add_token=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.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl