Clearer lost-password errors and a request-new-link action
Every stale reset link produced a bare 'Ungültiges Token', which sent users into a loop of requesting ever more e-mails. The overridden core messages now explain that only the link from the newest e-mail counts, the auth message template offers a direct 'Neuen Link anfordern' button, and the change-password page asks for the 'Aktuelles Passwort' with a hint covering freshly reset passwords. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Verständlichere Texte rund um "Passwort vergessen" für technische Laien.
|
||||||
|
*
|
||||||
|
* Hintergrund: Contao zeigt für jeden nicht (mehr) gültigen Reset-Link nur
|
||||||
|
* "Ungültiges Token". Das passiert im Alltag vor allem, wenn ein bereits
|
||||||
|
* benutzter Link erneut angeklickt wird oder ein Link aus einer älteren
|
||||||
|
* E-Mail geöffnet wird (beim erfolgreichen Zurücksetzen werden alle älteren
|
||||||
|
* Links ungültig). Die Texte erklären das und zeigen den Ausweg.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$GLOBALS['TL_LANG']['MSC']['invalidToken'] = 'Dieser Link ist nicht mehr gültig. Er wurde bereits verwendet, ist abgelaufen oder wurde durch eine neuere E-Mail ersetzt. Bitte fordern Sie einen neuen Link an – es gilt immer der Link aus der neuesten E-Mail.';
|
||||||
|
$GLOBALS['TL_LANG']['MSC']['tokenConfirmed'] = 'Dieser Link wurde bereits verwendet – Ihr Passwort wurde damit schon geändert. Melden Sie sich mit Ihrem neuen Passwort an oder fordern Sie bei Bedarf einen neuen Link an.';
|
||||||
|
|
||||||
|
// "Altes Passwort" verwirrt direkt nach einem Passwort-Reset: Gemeint ist immer
|
||||||
|
// das Passwort der aktuellen Anmeldung.
|
||||||
|
$GLOBALS['TL_LANG']['MSC']['oldPassword'] = 'Aktuelles Passwort';
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clearer "lost password" wording for non-technical users.
|
||||||
|
* See contao/languages/de/default.php for the rationale.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$GLOBALS['TL_LANG']['MSC']['invalidToken'] = 'This link is no longer valid. It has already been used, has expired or has been replaced by a newer e-mail. Please request a new link – only the link from the most recent e-mail is valid.';
|
||||||
|
$GLOBALS['TL_LANG']['MSC']['tokenConfirmed'] = 'This link has already been used – your password has already been changed with it. Sign in with your new password or request a new link if needed.';
|
||||||
|
|
||||||
|
$GLOBALS['TL_LANG']['MSC']['oldPassword'] = 'Current password';
|
||||||
@@ -16,9 +16,15 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% if surveyIsAuthMessage %}
|
{% if surveyIsAuthMessage %}
|
||||||
|
{# Fehler bei einem Reset-Link (?token=pw-...): direkt den Weg zu einem
|
||||||
|
neuen Link anbieten - die Seite ohne Token zeigt das Anforderungsformular. #}
|
||||||
|
{% set surveyTokenError = type == 'error' and (app.request.query.get('token')|default('')) starts with 'pw-' %}
|
||||||
<div class="survey-auth-card">
|
<div class="survey-auth-card">
|
||||||
<p class="{{ type }} message">{{ message }}</p>
|
<p class="{{ type }} message">{{ message }}</p>
|
||||||
<p class="survey-auth-actions">
|
<p class="survey-auth-actions">
|
||||||
|
{% if surveyTokenError %}
|
||||||
|
<a class="survey-auth-button" href="{{ app.request.baseUrl ~ app.request.pathInfo }}">{{ 'survey.auth.request_new_link'|trans }}</a>
|
||||||
|
{% endif %}
|
||||||
<a class="survey-auth-button" href="{{ app.request.baseUrl }}/">{{ 'survey.auth.back_to_login'|trans }}</a>
|
<a class="survey-auth-button" href="{{ app.request.baseUrl }}/">{{ 'survey.auth.back_to_login'|trans }}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user