diff --git a/templates/loginform.php b/templates/loginform.php index 4be3aa580c7f881ccd1b2da21f04045a6a5b71ee..27f55a73970e568fda110bb2eae457361ac666b2 100644 --- a/templates/loginform.php +++ b/templates/loginform.php @@ -30,97 +30,99 @@ $show_hidden_login = false; <div id="background-mobile" style="background: url(<?= $bg_mobile ?>) no-repeat top left/cover;"></div> <div id="login_flex"> - <? if ($loginerror): ?> - <!-- failed login code --> - <?= MessageBox::error(_('Bei der Anmeldung trat ein Fehler auf!'), [ - $error_msg, - sprintf( - _('Bitte wenden Sie sich bei Problemen an: <a href="mailto:%1$s">%1$s</a>'), - $GLOBALS['UNI_CONTACT'] - ) - ]) ?> - <? endif ?> - - <?= implode('', PageLayout::getMessages()); ?> - - <div id="loginbox"> - <header> - <h1><?= htmlReady(Config::get()->UNI_NAME_CLEAN) ?></h1> - </header> - - <? if (count($GLOBALS['STUDIP_AUTH_PLUGIN']) === 1 && StudipAuthAbstract::isLoginEnabled()) : ?> - <?= $this->render_partial('_standard_loginform', [ - 'hidden' => false, + <div> + <? if ($loginerror): ?> + <!-- failed login code --> + <?= MessageBox::error(_('Bei der Anmeldung trat ein Fehler auf!'), [ + $error_msg, + sprintf( + _('Bitte wenden Sie sich bei Problemen an: <a href="mailto:%1$s">%1$s</a>'), + $GLOBALS['UNI_CONTACT'] + ) ]) ?> <? endif ?> - <nav> - <ul> - <? foreach (Navigation::getItem('/login') as $key => $nav) : ?> - <? if ($nav->isVisible()) : ?> - <? if ($key === 'standard_login') { - if (count($GLOBALS['STUDIP_AUTH_PLUGIN']) === 1 && StudipAuthAbstract::isLoginEnabled()) { - continue; - } else { - $show_hidden_login = true; - } - } - ?> - <? $name_and_title = explode(' - ', $nav->getTitle()) ?> - <li class="login_link"> - <? if (is_internal_url($url = $nav->getURL())) : ?> - <? SkipLinks::addLink($name_and_title[0], $url) ?> - <a href="<?= URLHelper::getLink($url, ['cancel_login' => 1]) ?>" <?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?>> - <? else : ?> - <a href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer"> - <? endif ?> - <?= htmlReady($name_and_title[0]) ?> - <p> - <?= htmlReady(!empty($name_and_title[1]) ? $name_and_title[1] : $nav->getDescription()) ?> - </p> - </a> - </li> - <? endif ?> - <? endforeach ?> - </ul> - </nav> - <? if ($show_hidden_login) : ?> - <?= $this->render_partial('_standard_loginform', [ - 'hidden' => empty($loginerror), - ]) ?> - <? endif ?> + <?= implode('', PageLayout::getMessages()); ?> + <div id="loginbox"> + <header> + <h1><?= htmlReady(Config::get()->UNI_NAME_CLEAN) ?></h1> + </header> - <footer> - <? if ($GLOBALS['UNI_LOGIN_ADD']) : ?> - <div class="uni_login_add"> - <?= $GLOBALS['UNI_LOGIN_ADD'] ?> - </div> + <? if (count($GLOBALS['STUDIP_AUTH_PLUGIN']) === 1 && StudipAuthAbstract::isLoginEnabled()) : ?> + <?= $this->render_partial('_standard_loginform', [ + 'hidden' => false, + ]) ?> <? endif ?> + <nav> + <ul> + <? foreach (Navigation::getItem('/login') as $key => $nav) : ?> + <? if ($nav->isVisible()) : ?> + <? if ($key === 'standard_login') { + if (count($GLOBALS['STUDIP_AUTH_PLUGIN']) === 1 && StudipAuthAbstract::isLoginEnabled()) { + continue; + } else { + $show_hidden_login = true; + } + } + ?> + <? $name_and_title = explode(' - ', $nav->getTitle()) ?> + <li class="login_link"> + <? if (is_internal_url($url = $nav->getURL())) : ?> + <? SkipLinks::addLink($name_and_title[0], $url) ?> + <a href="<?= URLHelper::getLink($url, ['cancel_login' => 1]) ?>" <?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?>> + <? else : ?> + <a href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer"> + <? endif ?> + <?= htmlReady($name_and_title[0]) ?> + <p> + <?= htmlReady(!empty($name_and_title[1]) ? $name_and_title[1] : $nav->getDescription()) ?> + </p> + </a> + </li> + <? endif ?> + <? endforeach ?> + </ul> + </nav> - <div id="languages"> - <? foreach ($GLOBALS['INSTALLED_LANGUAGES'] as $temp_language_key => $temp_language): ?> - <?= Assets::img('languages/' . $temp_language['picture'], ['alt' => $temp_language['name'], 'size' => '24']) ?> - <a href="<?= URLHelper::getLink('index.php', ['set_language' =>$temp_language_key ]) ?>"> - <?= htmlReady($temp_language['name']) ?> - </a> - <? endforeach ?> - </div> + <? if ($show_hidden_login) : ?> + <?= $this->render_partial('_standard_loginform', [ + 'hidden' => empty($loginerror), + ]) ?> + <? endif ?> - <div id="contrast"> - <? if (isset($_SESSION['contrast'])) : ?> - <?= Icon::create('accessibility')->asImg(24) ?> - <a href="<?= URLHelper::getLink('index.php', ['unset_contrast' => 1, 'cancel_login' => 1]) ?>"><?= _('Normalen Kontrast aktivieren') ?></a> - <?= tooltipIcon(_('Aktiviert standardmäßige, nicht barrierefreie Kontraste.')); ?> - <? else : ?> - <?= Icon::create('accessibility')->asImg(24) ?> - <a href="<?= URLHelper::getLink('index.php', ['set_contrast' => 1, 'cancel_login' => 1]) ?>" id="highcontrastlink"><?= _('Hohen Kontrast aktivieren')?></a> - <?= tooltipIcon(_('Aktiviert einen hohen Kontrast gemäß WCAG 2.1. Diese Einstellung wird nach dem Login übernommen.' - . 'Sie können sie in Ihren persönlichen Einstellungen ändern.')); ?> + <footer> + <? if ($GLOBALS['UNI_LOGIN_ADD']) : ?> + <div class="uni_login_add"> + <?= $GLOBALS['UNI_LOGIN_ADD'] ?> + </div> <? endif ?> - </div> - </footer> + <div id="languages"> + <? foreach ($GLOBALS['INSTALLED_LANGUAGES'] as $temp_language_key => $temp_language): ?> + <?= Assets::img('languages/' . $temp_language['picture'], ['alt' => $temp_language['name'], 'size' => '24']) ?> + <a href="<?= URLHelper::getLink('index.php', ['set_language' =>$temp_language_key ]) ?>"> + <?= htmlReady($temp_language['name']) ?> + </a> + <? endforeach ?> + </div> + + <div id="contrast"> + <? if (isset($_SESSION['contrast'])) : ?> + <?= Icon::create('accessibility')->asImg(24) ?> + <a href="<?= URLHelper::getLink('index.php', ['unset_contrast' => 1, 'cancel_login' => 1]) ?>"><?= _('Normalen Kontrast aktivieren') ?></a> + <?= tooltipIcon(_('Aktiviert standardmäßige, nicht barrierefreie Kontraste.')); ?> + <? else : ?> + <?= Icon::create('accessibility')->asImg(24) ?> + <a href="<?= URLHelper::getLink('index.php', ['set_contrast' => 1, 'cancel_login' => 1]) ?>" id="highcontrastlink"><?= _('Hohen Kontrast aktivieren')?></a> + <?= tooltipIcon(_('Aktiviert einen hohen Kontrast gemäß WCAG 2.1. Diese Einstellung wird nach dem Login übernommen.' + . 'Sie können sie in Ihren persönlichen Einstellungen ändern.')); ?> + <? endif ?> + </div> + + </footer> + </div> </div> + <? if (Config::get()->LOGIN_FAQ_VISIBILITY && count($faq_entries) > 0) : ?> <div id="faq_box"> <header><h1><?= htmlReady(Config::get()->LOGIN_FAQ_TITLE) ?></h1></header>