Redirect new registers to dashboard instead of discover

stable
Xavier Julián 2016-02-22 09:43:30 +01:00 committed by David Barragán Merino
parent db8853d050
commit 69a2202b5f
1 changed files with 1 additions and 6 deletions

View File

@ -299,16 +299,11 @@ RegisterDirective = ($auth, $confirm, $location, $navUrls, $config, $routeParams
$scope.data = {}
form = $el.find("form").checksley({onlyOneErrorElement: true})
if $routeParams['next'] and $routeParams['next'] != $navUrls.resolve("register")
$scope.nextUrl = decodeURIComponent($routeParams['next'])
else
$scope.nextUrl = $navUrls.resolve("home")
$scope.nextUrl = $navUrls.resolve("home")
onSuccessSubmit = (response) ->
$analytics.trackEvent("auth", "register", "user registration", 1)
$confirm.notify("success", $translate.instant("LOGIN_FORM.SUCCESS"))
$location.url($scope.nextUrl)
onErrorSubmit = (response) ->