diff options
4 files changed, 71 insertions, 1 deletions
diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js index aed5c05dd..daa60ac11 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js @@ -189,7 +189,30 @@ function isIE() { function checkIfBrowserIsSafari(){ var cond1 = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; return cond1; - } + } + function setBKUAvailable(available) { + login = document.getElementById("localBKU"); + //active = (login.className.indexOf("lokalebkuaktiv") != -1); + try { + if (available) { + console.log("Local BKU available") + //login.className = login.className.replace("lokalebkuinaktiv", "lokalebkuaktiv"); + var localBKUForm = document.getElementById("moaidform"); + var button = localBKUForm.getElementsByTagName("input")[5]; + button.removeAttribute("class");; + button.setAttribute("title","Bürgerkarte mit localer Bürgerkartenumgebung."); + } else if (!available) { + //login.className = login.className.replace("lokalebkuaktiv", "lokalebkuinaktiv"); + var localBKUForm = document.getElementById("moaidform"); + var button = localBKUForm.getElementsByTagName("input")[5]; + button.setAttribute("class","browserInfoButton"); + button.setAttribute("title","Es wurde keine Bürgerkartenumgebung gefunden. Sollte es sich hierbei um einen Fehler handeln können Sie den Prozess durch einen Klick auf den Button denoch fortsetzen."); + console.log("Local BKU NOT available") + } + } catch(e) {console.log("Local BKU detection is not possible! Msg: "+e);} + + } + /* function setSSOSelection() { document.getElementById("useSSO").value = "false"; var checkbox = document.getElementById("SSOCheckBox"); diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html index 32f0a7d4d..794145a2d 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html @@ -60,6 +60,7 @@ <input type="submit" value=" Lokale Bürgerkartenumgebung " tabindex="4" role="button" onclick="setMandateSelection();"> </form> + <iframe name="bkudetect" width="0" height="0" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" src="$contextPath/iframeLBKUdetect.html"><\/iframe> </div> <!-- Single Sign-On Session transfer functionality --> diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html new file mode 100644 index 000000000..54dc9d910 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html @@ -0,0 +1,32 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="de"> +<head> +<title>BKU-Erkennung</title> +<script type="text/javascript"> +<!-- + bkuprot = location.protocol; + bkuhost = "localhost"; + bkuport = (bkuprot == "https:" ? 3496 : 3495); + bkupath = "https-security-layer-request"; + bkuurl = bkuprot + "//" + bkuhost + ":" + bkuport + "/" + bkupath; + baseurl = location.href.substr(0, location.href.lastIndexOf("/")); +//--> +</script> +</head> +<body style="background-color:transparent"> +<script type="text/javascript"> +<!-- + if (bkuprot == "https:" || bkuprot == "http:") { + parent.setBKUAvailable(false); + document.write('<form name="bkudetectform" method="POST" target="bkudetect" action="' + bkuurl + '" enctype="application/x-www-form-urlencoded">'); + document.write('<input type="hidden" name="XMLRequest" value="<?xml version="1.0" encoding="UTF-8"?><NullOperationRequest xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#"/>" />'); + document.write('<input type="hidden" name="RedirectURL" value="' + baseurl + '/iframeLBKUdetected.html"/>'); + document.write('</form>'); + try { + document.bkudetectform.submit(); + } catch(e) {} + } +//--> +</script> +</body> +</html> diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html new file mode 100644 index 000000000..8769c38ad --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html @@ -0,0 +1,14 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="de"> +<head> +<title>BKU-Erkennung</title> +<script type="text/javascript"> + parent.setBKUAvailable(true); +</script> +</head> +<body style="background-color:transparent"> +<script type="text/javascript"> + parent.setBKUAvailable(true); +</script> +</body> +</html> |