Files
breadcrumb-the-shire/templates/partials/auth-help-links.phtml
2026-03-07 14:10:36 +01:00

36 lines
1.2 KiB
PHTML

<?php
$authHelpContext = is_array($authHelpContext ?? null) ? $authHelpContext : [];
$showForgot = !empty($authHelpContext['show_forgot']);
$showRegister = !empty($authHelpContext['show_register']) && allowRegistration();
$showBackToLogin = !empty($authHelpContext['show_back_to_login']);
$showSupport = array_key_exists('show_support', $authHelpContext) ? !empty($authHelpContext['show_support']) : true;
$links = [];
if ($showForgot) {
$links[] = ['href' => lurl('password/forgot'), 'label' => t('Forgot password')];
}
if ($showRegister) {
$links[] = ['href' => lurl('register'), 'label' => t('Register')];
}
if ($showBackToLogin) {
$links[] = ['href' => lurl('login'), 'label' => t('Back to login')];
}
if ($showSupport) {
$links[] = ['href' => lurl('imprint'), 'label' => t('Problems logging in')];
}
if (!$links) {
return;
}
?>
<nav class="login-help-links" aria-label="<?php e(t('Support')); ?>">
<ul class="login-help-links-list">
<?php foreach ($links as $link): ?>
<li class="login-help-links-item">
<a href="<?php e((string) ($link['href'] ?? '')); ?>"><?php e((string) ($link['label'] ?? '')); ?></a>
</li>
<?php endforeach; ?>
</ul>
</nav>