Update :return_url value when re-sending email confirmations

This commit is contained in:
Matt-Yorkley
2018-04-18 16:26:39 +01:00
committed by Rob Harrington
parent 1f23402912
commit 1c57f0f241
3 changed files with 7 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ Darkswarm.controller "ForgotCtrl", ($scope, $http, $location, AuthenticationServ
$scope.errors = t 'email_required'
$scope.resend_confirmation = ->
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user}).success (data)->
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).success (data)->
$scope.messages = t('devise.confirmations.send_instructions')
.error (data) ->
$scope.errors = t('devise.confirmations.failed_to_send')

View File

@@ -14,7 +14,7 @@ Darkswarm.controller "LoginCtrl", ($scope, $timeout, $location, $http, $window,
$scope.user_unconfirmed = (data.error == t('devise.failure.unconfirmed'))
$scope.resend_confirmation = ->
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user}).success (data)->
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).success (data)->
$scope.messages = t('devise.confirmations.send_instructions')
.error (data) ->
$scope.errors = t('devise.confirmations.failed_to_send')