X-Git-Url: https://git-public.kairo.at/?a=blobdiff_plain;ds=sidebyside;f=authsystem.js;h=dee8142337666c5fe1c4b3073a50da4b1a40f019;hb=b217e836543c89d872c8f692e2557c8c43da468f;hp=8fd97566360ccce5fe1a5f0bdc179020ce9506ad;hpb=d26d08a171f0f65437bc7ea416239cfb31c4db27;p=authserver.git diff --git a/authsystem.js b/authsystem.js index 8fd9756..dee8142 100644 --- a/authsystem.js +++ b/authsystem.js @@ -3,9 +3,43 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ window.onload = function() { - document.getElementById("jswarning").classList.add("hidden"); + var jsWarning = document.getElementById("jswarning"); + if (jsWarning) { + 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() { + // Not implemented yet. + } + } + var isNotMe = document.getElementById("isnotme"); + if (isNotMe) { + isNotMe.onclick = function() { + location.href = location.href + "&logout=1"; + } } }