From f5383e3c05169ef905f14af86b62849634a56ac5 Mon Sep 17 00:00:00 2001 From: elweyn Date: Sat, 22 Jan 2022 14:11:54 +0100 Subject: [PATCH] In case where the user has used an OptIn code that was to old then the user is send to a thx/resetFailed page where he gets a message that the code was to old. --- frontend/src/locales/de.json | 1 + frontend/src/locales/en.json | 3 ++- frontend/src/views/Pages/ResetPassword.vue | 2 +- frontend/src/views/Pages/thx.vue | 6 ++++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 7ca877c08..840cde454 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -204,6 +204,7 @@ "errorTitle": "Achtung!", "register": "Du bist jetzt registriert, bitte überprüfe deine Emails und klicke auf den Aktivierungslink.", "reset": "Dein Passwort wurde geändert.", + "resetPassword": "Den Code den Du genutzt hast ist zu alt bitte fordere ein neuen über die Passwort Reset Seite an.", "title": "Danke!" } }, diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index c6cbeed69..8cb2a609a 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -197,13 +197,14 @@ "uppercase": "One uppercase letter required." }, "thx": { - "activateEmail": "Your account has not been activated yet, please check your emails and click the activation link!", + "activateEmail": "Your account has not been activated yet, please check your emails and click the activation link! Or order a new activation link over the password reset page.", "checkEmail": "Your email has been successfully verified.", "email": "We have sent you an email.", "emailActivated": "Thank you your email has been activated.", "errorTitle": "Attention!", "register": "You are registered now, please check your emails and click the activation link.", "reset": "Your password has been changed.", + "resetPassword": "The code you used was to old please order a new on over the password reset page.", "title": "Thank you!" } }, diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/views/Pages/ResetPassword.vue index c933e4032..2e171936a 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/views/Pages/ResetPassword.vue @@ -97,7 +97,7 @@ export default { .catch((error) => { this.$toasted.global.error(error.message) if (error.message.includes('Code is older than 10 minutes')) { - this.$router.push('/thx/login') + this.$router.push('/thx/resetFailed') } }) }, diff --git a/frontend/src/views/Pages/thx.vue b/frontend/src/views/Pages/thx.vue index 605b88ca1..29896108d 100644 --- a/frontend/src/views/Pages/thx.vue +++ b/frontend/src/views/Pages/thx.vue @@ -48,6 +48,12 @@ const textFields = { button: 'settings.password.reset', linkTo: '/password', }, + resetFailed: { + headline: 'site.thx.errorTitle', + subtitle: 'site.thx.resetPassword', + button: 'settings.password.reset', + linkTo: '/password', + }, } export default {