ui/ux login optimization
This commit is contained in:
@@ -10,6 +10,10 @@ use MintyPHP\Session;
|
||||
|
||||
Buffer::set('title', t('Forgot password'));
|
||||
$errorNoticeId = !empty($errors) ? 'auth-forgot-error-notice' : '';
|
||||
$authHelpContext = [
|
||||
'show_back_to_login' => true,
|
||||
'show_support' => true,
|
||||
];
|
||||
?>
|
||||
|
||||
<article>
|
||||
|
||||
@@ -37,15 +37,27 @@ $errors = is_array($errors ?? null) ? $errors : [];
|
||||
$errorNoticeId = $errors ? 'auth-login-error-notice' : '';
|
||||
$loginHeading = t('Login');
|
||||
$loginSubheading = t('Please enter your credentials');
|
||||
$authHelpContext = ['show_support' => true];
|
||||
if ($stage === 'resolve_email') {
|
||||
$loginHeading = t('Login');
|
||||
$loginSubheading = t('Enter your email to continue');
|
||||
$authHelpContext = [
|
||||
'show_register' => true,
|
||||
'show_support' => true,
|
||||
];
|
||||
} elseif ($stage === 'choose_tenant') {
|
||||
$loginHeading = t('Select tenant');
|
||||
$loginSubheading = t('Select your tenant to continue');
|
||||
$authHelpContext = [
|
||||
'show_support' => true,
|
||||
];
|
||||
} else {
|
||||
$loginHeading = t('Login options');
|
||||
$loginSubheading = t('Choose how you want to sign in');
|
||||
$authHelpContext = [
|
||||
'show_forgot' => !empty($selectedTenantMethods['local']),
|
||||
'show_support' => true,
|
||||
];
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -87,7 +99,6 @@ if ($stage === 'resolve_email') {
|
||||
<input type="hidden" name="email" value="<?php e($email); ?>">
|
||||
<input type="hidden" name="tenant_hint" value="<?php e($tenantHint); ?>">
|
||||
<fieldset class="login-tenant-fieldset">
|
||||
<!-- <legend class="login-tenant-select-label"><?php e(t('Which tenant do you want to sign in to?')); ?></legend> -->
|
||||
<div class="login-tenant-choice-grid">
|
||||
<?php foreach ($tenantCandidates as $tenantCandidate): ?>
|
||||
<?php
|
||||
@@ -147,7 +158,7 @@ if ($stage === 'resolve_email') {
|
||||
<input type="hidden" name="stage" value="resolve_email">
|
||||
<input type="hidden" name="email" value="<?php e($email); ?>">
|
||||
<input type="hidden" name="tenant_hint" value="<?php e($tenantHint); ?>">
|
||||
<button type="submit" class="secondary outline"><?php e(t('Switch tenant')); ?></button>
|
||||
<button type="submit" class="secondary outline small"><?php e(t('Switch tenant')); ?></button>
|
||||
<?php Session::getCsrfInput(); ?>
|
||||
</form>
|
||||
</section>
|
||||
@@ -195,16 +206,6 @@ if ($stage === 'resolve_email') {
|
||||
<?php e(t('No login method is available for this tenant')); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<hr>
|
||||
<form method="post">
|
||||
<input type="hidden" name="stage" value="resolve_email">
|
||||
<input type="hidden" name="email" value="<?php e($email); ?>">
|
||||
<input type="hidden" name="tenant_hint" value="<?php e($tenantHint); ?>">
|
||||
<p>
|
||||
<button type="submit" class="secondary outline"><?php e(t('Use different email')); ?></button>
|
||||
</p>
|
||||
<?php Session::getCsrfInput(); ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php require templatePath('partials/auth-help-links.phtml'); ?>
|
||||
|
||||
@@ -17,6 +17,10 @@ $passwordMinLength = (int) ($passwordMinLength ?? 0);
|
||||
$passwordHints = is_array($passwordHints ?? null) ? $passwordHints : [];
|
||||
$errorNoticeId = !empty($error) ? 'auth-register-error-notice' : '';
|
||||
$passwordHintId = 'auth-register-password-hints';
|
||||
$authHelpContext = [
|
||||
'show_back_to_login' => true,
|
||||
'show_support' => true,
|
||||
];
|
||||
?>
|
||||
<article>
|
||||
<header>
|
||||
|
||||
@@ -12,6 +12,10 @@ use MintyPHP\Session;
|
||||
Buffer::set('title', t('Reset password'));
|
||||
$errorNoticeId = !empty($errors) ? 'auth-reset-error-notice' : '';
|
||||
$passwordHintId = 'auth-reset-password-hints';
|
||||
$authHelpContext = [
|
||||
'show_back_to_login' => true,
|
||||
'show_support' => true,
|
||||
];
|
||||
?>
|
||||
|
||||
<article>
|
||||
|
||||
@@ -11,6 +11,10 @@ use MintyPHP\Session;
|
||||
|
||||
Buffer::set('title', t('Verify code'));
|
||||
$errorNoticeId = !empty($errors) ? 'auth-verify-error-notice' : '';
|
||||
$authHelpContext = [
|
||||
'show_back_to_login' => true,
|
||||
'show_support' => true,
|
||||
];
|
||||
?>
|
||||
|
||||
<article>
|
||||
|
||||
@@ -11,6 +11,10 @@ use MintyPHP\Session;
|
||||
|
||||
Buffer::set('title', t('Verify email'));
|
||||
$errorNoticeId = !empty($errors) ? 'auth-verify-email-error-notice' : '';
|
||||
$authHelpContext = [
|
||||
'show_back_to_login' => true,
|
||||
'show_support' => true,
|
||||
];
|
||||
?>
|
||||
|
||||
<article>
|
||||
|
||||
Reference in New Issue
Block a user