mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-19 04:49:15 +00:00
Ensure email validation link returns to /register paths properly
This commit is contained in:
committed by
Maikel Linke
parent
d7a3c50bd5
commit
e8bc87e62b
@@ -20,8 +20,8 @@ Darkswarm.controller "LoginCtrl", ($scope, $timeout, $location, $http, $window,
|
||||
$scope.errors = t('devise.confirmations.failed_to_send')
|
||||
|
||||
$timeout ->
|
||||
if angular.isDefined($location.search()['confirmation'])
|
||||
if $location.search()['confirmation'] == 'confirmed'
|
||||
if angular.isDefined($location.search()['validation'])
|
||||
if $location.search()['validation'] == 'confirmed'
|
||||
$scope.messages = t('devise.confirmations.confirmed')
|
||||
if $location.search()['confirmation'] == 'not_confirmed'
|
||||
if $location.search()['validation'] == 'not_confirmed'
|
||||
$scope.errors = t('devise.confirmations.not_confirmed')
|
||||
|
||||
@@ -7,7 +7,10 @@ Darkswarm.factory "AuthenticationService", (Navigation, $modal, $location, Redir
|
||||
if $location.path() in ["/login", "/signup", "/forgot"] && location.pathname isnt '/register/auth'
|
||||
@open $location.path()
|
||||
else if location.pathname is '/register/auth'
|
||||
@open '/signup', 'registration_authentication.html'
|
||||
if angular.isDefined($location.search()['validation'])
|
||||
@open '/login', 'registration_authentication.html'
|
||||
else
|
||||
@open '/signup', 'registration_authentication.html'
|
||||
|
||||
open: (path = false, template = 'authentication.html') =>
|
||||
@modalInstance = $modal.open
|
||||
|
||||
Reference in New Issue
Block a user