get rid of autoref
parent
484dfc2ea7
commit
adf0d73c1a
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue