Login redirect now set via thymeleaf not JS
This commit is contained in:
parent
71fcbd5ef0
commit
eec46598f6
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<form class="form-sign_in" method="POST" sec:authorize="!isAuthenticated()" th:action="@{/login}">
|
||||
<div class="form-group d-flex flex-row align-items-center">
|
||||
<input id="redirectURL" name="redirect" type="hidden" value="">
|
||||
<input id="redirectURL" name="redirect" type="hidden" th:value="${#httpServletRequest.requestURI} + (${#httpServletRequest.queryString} ? '?' + ${#httpServletRequest.queryString} : '')">
|
||||
<!--suppress HtmlFormInputWithoutLabel -->
|
||||
<input class="form-control form-control-sm" id="username" name="username" placeholder="Username" type="text" autocomplete="username">
|
||||
<!--suppress HtmlFormInputWithoutLabel -->
|
||||
@ -45,10 +45,6 @@
|
||||
<button class="btn btn-primary btn-sm text-nowrap" type="submit">Log In</button>
|
||||
<a class="btn btn-secondary btn-sm" th:href="@{/register}">Register</a>
|
||||
</div>
|
||||
<script>
|
||||
// Set logging in via this page to redirect back to this exact page
|
||||
document.getElementById('redirectURL').setAttribute('value', window.location.href)
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user