/**
  * Init login form
  */
 protected function initLoginForm()
 {
     global $rbacsystem, $lng, $ilSetting;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this, 'saveLoginInfo'));
     $this->form->setTableWidth('80%');
     $this->form->setTitle($this->lng->txt('login_information'));
     $this->form->addCommandButton('saveLoginInfo', $this->lng->txt('save'));
     include_once 'Services/LDAP/classes/class.ilLDAPServer.php';
     include_once 'Services/Radius/classes/class.ilRadiusSettings.php';
     $rad_settings = ilRadiusSettings::_getInstance();
     if ($ldap_id = ilLDAPServer::_getFirstActiveServer() or $rad_settings->isActive()) {
         $select = new ilSelectInputGUI($this->lng->txt('default_auth_mode'), 'default_auth_mode');
         $select->setValue($ilSetting->get('default_auth_mode', AUTH_LOCAL));
         $select->setInfo($this->lng->txt('default_auth_mode_info'));
         $options[AUTH_LOCAL] = $this->lng->txt('auth_local');
         if ($ldap_id) {
             $options[AUTH_LDAP] = $this->lng->txt('auth_ldap');
         }
         if ($rad_settings->isActive()) {
             $options[AUTH_RADIUS] = $this->lng->txt('auth_radius');
         }
         $select->setOptions($options);
         $this->form->addItem($select);
     }
     if (!is_object($this->loginSettings)) {
         $this->loginSettings = new ilSetting("login_settings");
     }
     $login_settings = $this->loginSettings->getAll();
     $languages = $lng->getInstalledLanguages();
     $def_language = $lng->getDefaultLanguage();
     foreach ($this->setDefLangFirst($def_language, $languages) as $lang_key) {
         $add = "";
         if ($lang_key == $def_language) {
             $add = " (" . $lng->txt("default") . ")";
         }
         $textarea = new ilTextAreaInputGUI($lng->txt("meta_l_" . $lang_key) . $add, 'login_message_' . $lang_key);
         $textarea->setRows(10);
         $textarea->setValue($login_settings["login_message_" . $lang_key]);
         $textarea->setUseRte(true);
         $textarea->setRteTagSet("extended");
         $this->form->addItem($textarea);
         unset($login_settings["login_message_" . $lang_key]);
     }
     foreach ($login_settings as $key => $message) {
         $lang_key = substr($key, strrpos($key, "_") + 1, strlen($key) - strrpos($key, "_"));
         $textarea = new ilTextAreaInputGUI($lng->txt("meta_l_" . $lang_key) . $add, 'login_message_' . $lang_key);
         $textarea->setRows(10);
         $textarea->setValue($message);
         $textarea->setUseRte(true);
         $textarea->setRteTagSet("extended");
         if (!in_array($lang_key, $languages)) {
             $textarea->setAlert($lng->txt("not_installed"));
         }
         $this->form->addItem($textarea);
     }
 }