Redirect new registers to dashboard instead of discover
parent
db8853d050
commit
69a2202b5f
|
@ -299,16 +299,11 @@ RegisterDirective = ($auth, $confirm, $location, $navUrls, $config, $routeParams
|
||||||
$scope.data = {}
|
$scope.data = {}
|
||||||
form = $el.find("form").checksley({onlyOneErrorElement: true})
|
form = $el.find("form").checksley({onlyOneErrorElement: true})
|
||||||
|
|
||||||
if $routeParams['next'] and $routeParams['next'] != $navUrls.resolve("register")
|
$scope.nextUrl = $navUrls.resolve("home")
|
||||||
$scope.nextUrl = decodeURIComponent($routeParams['next'])
|
|
||||||
else
|
|
||||||
$scope.nextUrl = $navUrls.resolve("home")
|
|
||||||
|
|
||||||
onSuccessSubmit = (response) ->
|
onSuccessSubmit = (response) ->
|
||||||
$analytics.trackEvent("auth", "register", "user registration", 1)
|
$analytics.trackEvent("auth", "register", "user registration", 1)
|
||||||
|
|
||||||
$confirm.notify("success", $translate.instant("LOGIN_FORM.SUCCESS"))
|
|
||||||
|
|
||||||
$location.url($scope.nextUrl)
|
$location.url($scope.nextUrl)
|
||||||
|
|
||||||
onErrorSubmit = (response) ->
|
onErrorSubmit = (response) ->
|
||||||
|
|
Loading…
Reference in New Issue