fix: go back to user selection from other user (#6255)

* fix: go back to user selection from other user

* fix: replace button with left arrow
This commit is contained in:
Miguel Cabrerizo 2023-08-10 19:35:52 +02:00 committed by GitHub
parent 85423b73e9
commit dfd469c66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,12 @@
document.getElementById("back-button").addEventListener("click", goBack);
document.getElementById("back-button").style.visibility = wereInUserSelection()
? "visible"
: "hidden";
function goBack() {
history.back();
}
function wereInUserSelection() {
return window.location.href.includes("userselection");
}

View File

@ -33,6 +33,9 @@
{{template "error-message" .}}
<div class="lgn-actions lgn-reverse-order">
<a class="lgn-icon-button lgn-left-action" id="back-button" href="#">
<i class="lgn-icon-arrow-left-solid"></i>
</a>
<button class="lgn-raised-button lgn-primary lgn-initial-focus" id="submit-button" type="submit">{{t "Login.NextButtonText"}}</button>
<span class="fill-space"></span>
{{if hasRegistration}}
@ -59,5 +62,6 @@
<script src="{{ resourceUrl "scripts/form_submit.js" }}"></script>
<script src="{{ resourceUrl "scripts/default_form_validation.js" }}"></script>
<script src="{{ resourceUrl "scripts/input_suffix_offset.js" }}"></script>
<script src="{{ resourceUrl "scripts/go_back.js" }}"></script>
{{template "main-bottom" .}}