1
0

ui/ux login optimization

This commit is contained in:
2026-03-07 14:10:36 +01:00
parent 90a5126221
commit e3a0c0eb37
12 changed files with 165 additions and 47 deletions

View File

@@ -1,7 +1,35 @@
<?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')); ?>">
<a href="<?php e(lurl('password/forgot')); ?>"><?php e(t('Forgot password')); ?></a>
<?php if (allowRegistration()): ?>
<a href="<?php e(lurl('register')); ?>"><?php e(t('Register')); ?></a>
<?php endif; ?>
<a href="<?php e(lurl('imprint')); ?>"><?php e(t('Problems logging in')); ?></a>
<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>