From 91708233972760fa481bac46bc2526e65db17300 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 9 Mar 2017 07:49:41 +0100 Subject: add check if local citizen-card environment is running to CCE selection template --- .../moa-id/htmlTemplates/javascript_tempalte.js | 25 ++++++++++++++++- .../conf/moa-id/htmlTemplates/loginFormFull.html | 1 + .../main/resources/mainGUI/iframeLBKUdetect.html | 32 ++++++++++++++++++++++ .../main/resources/mainGUI/iframeLBKUdetected.html | 14 ++++++++++ 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetect.html create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/iframeLBKUdetected.html 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 @@ +