get rid of autoref

pull/3065/head
Niklas Fiekas 2017-05-22 15:05:55 +02:00
parent 484dfc2ea7
commit adf0d73c1a
3 changed files with 3 additions and 5 deletions

View File

@ -53,9 +53,7 @@ object Auth extends LilaController {
}
def login = Open { implicit ctx =>
val referrer = get("referrer") orElse {
getBool("autoref") ?? HTTPRequest.referer(ctx.req)
}
val referrer = get("referrer")
Ok(html.auth.login(api.loginForm, referrer)).fuccess
}

View File

@ -10,7 +10,7 @@
@if(ctx.isAuth) {
<a class="button toggle">Write a review</a>
} else {
<a href="@routes.Auth.login?autoref=1" class="button">Review this coach</a>
<a href="@routes.Auth.login?referrer=@currentPath" class="button">Review this coach</a>
}
}

View File

@ -36,7 +36,7 @@ module.exports = {
join: join,
joinWithdraw: function(ctrl) {
if (!ctrl.userId) return m('a.fbt.text.highlight', {
href: '/login?autoref=1',
href: '/login?referrer=' + window.location.pathname,
'data-icon': 'G'
}, ctrl.trans('signIn'));
if (ctrl.data.isFinished) return null;