Browse Source

fix: handle url fragments for redirects

Signed-off-by: Huub van der Voort <github@hvdvoort.nl>
pull/4464/head
Huub van der Voort 2 months ago
parent
commit
b6dc3fc3cf
  1. 9
      web/templates/login.html
  2. 5
      web/templates/password.html

9
web/templates/login.html

@ -16,4 +16,13 @@
</div>
</div>
<script type="text/javascript">
if (window.location.hash) {
var buttons = document.querySelectorAll('div.theme-form-row a');
buttons.forEach(function(button) {
button.href = button.href + window.location.hash;
});
}
</script>
{{ template "footer.html" . }}

5
web/templates/password.html

@ -38,6 +38,11 @@
var el = document.querySelector('#submit-login');
el.setAttribute('disabled', 'disabled');
};
if (window.location.hash) {
var form = document.querySelector('form');
form.action = (form.action || '') + window.location.hash;
}
</script>
{{ template "footer.html" . }}

Loading…
Cancel
Save