When user signs in/out, a proper redirect is performed.

This commit is contained in:
Šesták Vít
2016-02-12 20:17:30 +01:00
parent 2fb2c3fd72
commit feeec6aec6
5 changed files with 23 additions and 17 deletions

View File

@@ -74,9 +74,9 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<li>@header.identity.fold{
<a class="btn btn-default" href="@routes.AuthController.signIn()">Log in</a>
<a class="btn btn-default" href="@routes.AuthController.signIn(header.path+"?"+header.rawQueryString)">Log in</a>
}{ user =>
@form(routes.AuthController.signOut()){
@form(routes.AuthController.signOut(header.path+"?"+header.rawQueryString)){
@CSRF.formField
<button type="submit" class="btn btn-warning">Logout @user.username</button>
}