Bug 396 - Localize the Auth service (in German); including some fixes to make code...
[authserver.git] / app / authsystem.js
CommitLineData
d26d08a1
RK
1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5window.onload = function() {
409b55f4
RK
6 var jsWarning = document.getElementById("jswarning");
7 if (jsWarning) {
46f7aeda
RK
8 if (jsWarning.classList) {
9 jsWarning.classList.add("hidden");
10 }
11 else {
12 // IE9 or older (sigh)
13 jsWarning.setAttribute("class", "warn hidden");
14 }
409b55f4 15 }
d26d08a1
RK
16 var loginForm = document.getElementById("loginform");
17 if (loginForm) {
46f7aeda
RK
18 if (loginForm.classList) {
19 loginForm.classList.remove("hidden");
20 }
21 else {
22 // IE9 or older (sigh)
23 loginForm.setAttribute("class", "loginarea");
24 }
d26d08a1 25 }
b217e836
RK
26 var cancelAuth = document.getElementById("cancelauth");
27 if (cancelAuth) {
28 cancelAuth.onclick = function() {
29 document.getElementById("isauthorized").value = "no";
9cab985c 30 document.getElementById("authform").submit();
b217e836
RK
31 }
32 }
33 var addAnotherEmail = document.getElementById("addanotheremail");
34 if (addAnotherEmail) {
35 addAnotherEmail.onclick = function() {
60e46184 36 location.href = "./?addemail";
b217e836
RK
37 }
38 }
39 var isNotMe = document.getElementById("isnotme");
40 if (isNotMe) {
41 isNotMe.onclick = function() {
42 location.href = location.href + "&logout=1";
43 }
44 }
d26d08a1 45}