Improve the UX for /change-password/<token> and /invitation/<token> when token is invalid
parent
3ca9bbd3c0
commit
7ab154e99d
|
@ -359,14 +359,6 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven
|
|||
disableHeader: true
|
||||
}
|
||||
)
|
||||
$routeProvider.when("/change-password",
|
||||
{
|
||||
templateUrl: "auth/change-password-from-recovery.html",
|
||||
title: "CHANGE_PASSWORD.PAGE_TITLE",
|
||||
description: "CHANGE_PASSWORD.PAGE_TITLE",
|
||||
disableHeader: true
|
||||
}
|
||||
)
|
||||
$routeProvider.when("/change-password/:token",
|
||||
{
|
||||
templateUrl: "auth/change-password-from-recovery.html",
|
||||
|
|
|
@ -364,7 +364,10 @@ ChangePasswordFromRecoveryDirective = ($auth, $confirm, $location, $params, $nav
|
|||
$scope.tokenInParams = true
|
||||
$scope.data.token = $params.token
|
||||
else
|
||||
$scope.tokenInParams = false
|
||||
$location.path($navUrls.resolve("login"))
|
||||
|
||||
text = $translate.instant("CHANGE_PASSWORD_RECOVERY_FORM.ERROR")
|
||||
$confirm.notify("light-error",text)
|
||||
|
||||
form = $el.find("form").checksley()
|
||||
|
||||
|
@ -375,7 +378,7 @@ ChangePasswordFromRecoveryDirective = ($auth, $confirm, $location, $params, $nav
|
|||
$confirm.success(text)
|
||||
|
||||
onErrorSubmit = (response) ->
|
||||
text = $translate.instant("COMMON.GENERIC_ERROR", {error: response.data._error_message})
|
||||
text = $translate.instant("CHANGE_PASSWORD_RECOVERY_FORM.ERROR")
|
||||
$confirm.notify("light-error", text)
|
||||
|
||||
submit = debounce 2000, (event) =>
|
||||
|
@ -415,7 +418,7 @@ InvitationDirective = ($auth, $confirm, $location, $params, $navUrls, $analytics
|
|||
$location.path($navUrls.resolve("login"))
|
||||
|
||||
text = $translate.instant("INVITATION_LOGIN_FORM.NOT_FOUND")
|
||||
$confirm.success(text)
|
||||
$confirm.notify("light-error", text)
|
||||
|
||||
# Login form
|
||||
$scope.dataLogin = {token: token}
|
||||
|
|
|
@ -325,12 +325,10 @@
|
|||
"CHANGE_PASSWORD_RECOVERY_FORM": {
|
||||
"TITLE": "Create a new Taiga pass",
|
||||
"SUBTITLE": "And hey, you may want to eat some more iron-rich food, it's good for your brain :P",
|
||||
"PLACEHOLDER_RECOVER_PASSWORD_TOKEN": "Recover password token",
|
||||
"LINK_NEED_TOKEN": "Need one?",
|
||||
"TITLE_LINK_NEED_TOKEN": "Did you need a token to recover your password because you forgot it?",
|
||||
"PLACEHOLDER_NEW_PASSWORD": "New password",
|
||||
"PLACEHOLDER_RE_TYPE_NEW_PASSWORD": "Re-type new password",
|
||||
"ACTION_RESET_PASSWORD": "Reset Password",
|
||||
"ERROR": "Our Oompa Loompas can't find your request to recover your password. Try to ask for it again.",
|
||||
"SUCCESS": "Our Oompa Loompas saved your new password.<br /> Try to <strong>sign in</strong> with it."
|
||||
},
|
||||
"INVITATION": {
|
||||
|
@ -338,7 +336,7 @@
|
|||
"PAGE_DESCRIPTION": "Accept the invitation to join a project in Taiga, a project management platform for startups and agile developers & designers who want a simple, beautiful tool that makes work truly enjoyable."
|
||||
},
|
||||
"INVITATION_LOGIN_FORM": {
|
||||
"NOT_FOUND": "<strong>Ooops, we have a problem</strong><br />Our Oompa Loompas can't find your invitation.",
|
||||
"NOT_FOUND": "Our Oompa Loompas can't find your invitation.",
|
||||
"SUCCESS": "You've successfully joined this project, Welcome to {{project_name}}",
|
||||
"ERROR": "According to our Oompa Loompas, your are not registered yet or typed an invalid password."
|
||||
},
|
||||
|
|
|
@ -5,11 +5,6 @@ div.change-password-form-container(tg-change-password-from-recovery)
|
|||
span(translate="CHANGE_PASSWORD_RECOVERY_FORM.SUBTITLE")
|
||||
|
||||
form
|
||||
fieldset.token-change-password(ng-hide="tokenInParams")
|
||||
input(type="text", tg-capslock, name="token", ng-model="data.token", data-required="true",
|
||||
placeholder="{{'CHANGE_PASSWORD_RECOVERY_FORM.PLACEHOLDER_RECOVER_PASSWORD_TOKEN' | translate}}")
|
||||
a.get-token(href="", tg-nav="forgot-password",
|
||||
title="{{'CHANGE_PASSWORD_RECOVERY_FORM.TITLE_LINK_NEED_TOKEN' | translate}}", translate="CHANGE_PASSWORD_RECOVERY_FORM.LINK_NEED_TOKEN")
|
||||
fieldset
|
||||
input(type="password", tg-capslock, name="password", id="password", ng-model="data.password",
|
||||
data-required="true", placeholder="{{'CHANGE_PASSWORD_RECOVERY_FORM.PLACEHOLDER_NEW_PASSWORD' | translate}}")
|
||||
|
|
Loading…
Reference in New Issue