Show confirmation message in modal

This commit is contained in:
Matt-Yorkley
2018-02-15 17:47:54 +00:00
committed by Maikel Linke
parent bc621a3c43
commit 595bc5d1a5
3 changed files with 21 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
Darkswarm.controller "LoginCtrl", ($scope, $http, $window, AuthenticationService, Redirections, Loading) ->
Darkswarm.controller "LoginCtrl", ($scope, $timeout, $location, $http, $window, AuthenticationService, Redirections, Loading) ->
$scope.path = "/login"
$scope.submit = ->
@@ -17,4 +17,11 @@ Darkswarm.controller "LoginCtrl", ($scope, $http, $window, AuthenticationService
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user}).success (data)->
$scope.messages = t('devise.confirmations.send_instructions')
.error (data) ->
$scope.errors = t('devise.confirmations.failed_to_send')
$scope.errors = t('devise.confirmations.failed_to_send')
$timeout ->
if angular.isDefined($location.search()['confirmation'])
if $location.search()['confirmation'] == 'confirmed'
$scope.messages = t('devise.confirmations.confirmed')
if $location.search()['confirmation'] == 'not_confirmed'
$scope.errors = t('devise.confirmations.not_confirmed')