mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Event Category: SignIn/Signup Event Action: Signup Submit Success Event Name: the current url
18 lines
727 B
CoffeeScript
18 lines
727 B
CoffeeScript
angular.module('Darkswarm').controller "SignupCtrl", ($scope, $http, $window, $location, Redirections, AuthenticationService) ->
|
|
$scope.path = "/signup"
|
|
|
|
$scope.spree_user.password_confirmation = ''
|
|
|
|
$scope.errors =
|
|
email: null
|
|
password: null
|
|
|
|
$scope.submit = ->
|
|
$http.post("/user/spree_user", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).then (response)->
|
|
$scope.errors = {email: null, password: null}
|
|
$scope.messages = t('devise.user_registrations.spree_user.signed_up_but_unconfirmed')
|
|
if window._paq
|
|
window._paq.push(['trackEvent', 'Signin/Signup', 'Signup Submit Success', $location.absUrl()]);
|
|
.catch (response) ->
|
|
$scope.errors = response.data
|