Added a helper function to load another page
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-05-23 17:54:47 -04:00
parent 23f9105550
commit 8cee8575e1
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
@loadPage = (pagePath) ->
window.location.href = pagePath + '.html'

View File

@ -21,10 +21,10 @@ loginForm = (event) ->
localStorage.setItem('ldap_bind_pw', document.forms.loginForm.bind_pw.value)
localStorage.setItem('ldap_base_dn', baseDn)
window.location.href = 'index.html'
loadPage('index.html')
return
return
window.onload = ->
document.getElementById('loginForm').addEventListener 'submit', loginForm
document.getElementById('loginForm').addEventListener('submit', loginForm)
return