X-Git-Url: https://git-public.kairo.at/?p=authserver.git;a=blobdiff_plain;f=authsystem.js;h=7a24d84af4b5efde87be187e217d3256c78ffedf;hp=2e21b0f99003529365ed5ac36be482c8f1a840da;hb=c4e0aceb5d9e9076effd75de03f4588b65329740;hpb=409b55f4dbb4267e83e8ae2fda56f243ab8be250 diff --git a/authsystem.js b/authsystem.js index 2e21b0f..7a24d84 100644 --- a/authsystem.js +++ b/authsystem.js @@ -5,10 +5,41 @@ window.onload = function() { var jsWarning = document.getElementById("jswarning"); if (jsWarning) { - document.getElementById("jswarning").classList.add("hidden"); + if (jsWarning.classList) { + jsWarning.classList.add("hidden"); + } + else { + // IE9 or older (sigh) + jsWarning.setAttribute("class", "warn hidden"); + } } var loginForm = document.getElementById("loginform"); if (loginForm) { - loginForm.classList.remove("hidden"); + if (loginForm.classList) { + loginForm.classList.remove("hidden"); + } + else { + // IE9 or older (sigh) + loginForm.setAttribute("class", "loginarea"); + } + } + var cancelAuth = document.getElementById("cancelauth"); + if (cancelAuth) { + cancelAuth.onclick = function() { + document.getElementById("isauthorized").value = "no"; + document.getElementById("loginauthform").submit(); + } + } + var addAnotherEmail = document.getElementById("addanotheremail"); + if (addAnotherEmail) { + addAnotherEmail.onclick = function() { + location.href = "./?addemail"; + } + } + var isNotMe = document.getElementById("isnotme"); + if (isNotMe) { + isNotMe.onclick = function() { + location.href = location.href + "&logout=1"; + } } }