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
|
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",
|
$routeProvider.when("/change-password/:token",
|
||||||
{
|
{
|
||||||
templateUrl: "auth/change-password-from-recovery.html",
|
templateUrl: "auth/change-password-from-recovery.html",
|
||||||
|
|
|
@ -364,7 +364,10 @@ ChangePasswordFromRecoveryDirective = ($auth, $confirm, $location, $params, $nav
|
||||||
$scope.tokenInParams = true
|
$scope.tokenInParams = true
|
||||||
$scope.data.token = $params.token
|
$scope.data.token = $params.token
|
||||||
else
|
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()
|
form = $el.find("form").checksley()
|
||||||
|
|
||||||
|
@ -375,7 +378,7 @@ ChangePasswordFromRecoveryDirective = ($auth, $confirm, $location, $params, $nav
|
||||||
$confirm.success(text)
|
$confirm.success(text)
|
||||||
|
|
||||||
onErrorSubmit = (response) ->
|
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)
|
$confirm.notify("light-error", text)
|
||||||
|
|
||||||
submit = debounce 2000, (event) =>
|
submit = debounce 2000, (event) =>
|
||||||
|
@ -415,7 +418,7 @@ InvitationDirective = ($auth, $confirm, $location, $params, $navUrls, $analytics
|
||||||
$location.path($navUrls.resolve("login"))
|
$location.path($navUrls.resolve("login"))
|
||||||
|
|
||||||
text = $translate.instant("INVITATION_LOGIN_FORM.NOT_FOUND")
|
text = $translate.instant("INVITATION_LOGIN_FORM.NOT_FOUND")
|
||||||
$confirm.success(text)
|
$confirm.notify("light-error", text)
|
||||||
|
|
||||||
# Login form
|
# Login form
|
||||||
$scope.dataLogin = {token: token}
|
$scope.dataLogin = {token: token}
|
||||||
|
|
|
@ -325,12 +325,10 @@
|
||||||
"CHANGE_PASSWORD_RECOVERY_FORM": {
|
"CHANGE_PASSWORD_RECOVERY_FORM": {
|
||||||
"TITLE": "Create a new Taiga pass",
|
"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",
|
"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_NEW_PASSWORD": "New password",
|
||||||
"PLACEHOLDER_RE_TYPE_NEW_PASSWORD": "Re-type new password",
|
"PLACEHOLDER_RE_TYPE_NEW_PASSWORD": "Re-type new password",
|
||||||
"ACTION_RESET_PASSWORD": "Reset 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."
|
"SUCCESS": "Our Oompa Loompas saved your new password.<br /> Try to <strong>sign in</strong> with it."
|
||||||
},
|
},
|
||||||
"INVITATION": {
|
"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."
|
"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": {
|
"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}}",
|
"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."
|
"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")
|
span(translate="CHANGE_PASSWORD_RECOVERY_FORM.SUBTITLE")
|
||||||
|
|
||||||
form
|
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
|
fieldset
|
||||||
input(type="password", tg-capslock, name="password", id="password", ng-model="data.password",
|
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}}")
|
data-required="true", placeholder="{{'CHANGE_PASSWORD_RECOVERY_FORM.PLACEHOLDER_NEW_PASSWORD' | translate}}")
|
||||||
|
|
Loading…
Reference in New Issue