Merge pull request #888 from taigaio/issues/3896/redirect-register-dashboard

Redirect new registers to dashboard instead of discover
stable
David Barragán Merino 2016-02-23 13:14:34 +01:00
commit f2c7dc0fe3
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) ->