From 93acb35fdf7ca1118c5955a3bfa727619a26d178 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 16 Mar 2017 11:44:26 +0100 Subject: update default BKU selection templates to remove OnlineBKU --- .../conf/moa-id/htmlTemplates/css_template.css | 42 ++++++---- .../moa-id/htmlTemplates/javascript_tempalte.js | 16 +++- .../conf/moa-id/htmlTemplates/loginFormFull.html | 32 +++++--- id/server/doc/htmlTemplates/BKU-selection.html | 33 +++++--- .../BKU-selection_with_OnlineBKU.html | 92 ++++++++++++++++++++++ .../src/main/resources/templates/css_template.css | 22 ++++-- .../resources/templates/javascript_tempalte.js | 57 +++++++++++++- .../main/resources/templates/loginFormFull.html | 33 +++++--- 8 files changed, 268 insertions(+), 59 deletions(-) create mode 100644 id/server/doc/htmlTemplates/BKU-selection_with_OnlineBKU.html (limited to 'id') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css index aa1242371..691166911 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css @@ -23,7 +23,7 @@ /*border-radius: 5px;*/ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit]{ font-size: 0.85em; /*border-radius: 7px;*/ margin-bottom: 25px; @@ -69,7 +69,10 @@ margin-bottom: 25px; margin-top: 25px; } - + #alert_area { + width: 500px; + padding-left: 80px; + } #leftcontent { /*float:left; */ width:250px; @@ -168,7 +171,7 @@ /* border-radius: 5px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit]{ font-size: 0.7em; min-width: 55px; /*min-height: 1.1em; @@ -207,7 +210,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 0.75em; min-width: 60px; /* min-height: 0.95em; @@ -245,7 +248,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 0.85em; /* min-height: 1.05em; border-radius: 7px; */ @@ -277,7 +280,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 0.9em; /* min-height: 1.2em; border-radius: 8px; */ @@ -310,7 +313,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 1.0em; /* min-height: 1.3em; border-radius: 10px; */ @@ -368,7 +371,16 @@ font-size: 0pt; visibility: hidden; } - + + #alert_area { + visibility: visible; + width: 250px; + } + #alert_area > p:first-child { + display: none; + visibility: hidden; + } + #leftcontent { visibility: visible; margin-bottom: 0px; @@ -411,7 +423,7 @@ height: 25px; } - input[type=button] { + input[type=button],input[type=submit] { /* height: 11%; */ width: 70%; } @@ -452,9 +464,14 @@ text-align: right; } + #ssoSessionTransferBlock { + clear: both; + } + #stork { /*margin-bottom: 10px;*/ /* margin-top: 5px; */ + clear: both; } #mandateLogin { @@ -563,6 +580,7 @@ } + .selectTextHeader{ } @@ -620,12 +638,6 @@ margin-left: 5px; margin-bottom: 5px; } - - #alert_area { - width: 500px; - padding-left: 80px; - } - #processInfoArea { margin-bottom: 15px; margin-top: 15px; 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 daa60ac11..ca920f63b 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 @@ -191,7 +191,7 @@ function isIE() { return cond1; } function setBKUAvailable(available) { - login = document.getElementById("localBKU"); + //login = document.getElementById("localBKU"); //active = (login.className.indexOf("lokalebkuaktiv") != -1); try { if (available) { @@ -201,12 +201,26 @@ function isIE() { var button = localBKUForm.getElementsByTagName("input")[5]; button.removeAttribute("class");; button.setAttribute("title","Bürgerkarte mit localer Bürgerkartenumgebung."); + + var image = document.getElementById("bkuimage"); + var srcatt = image.getAttribute("src"); + var last = srcatt.substring(srcatt.lastIndexOf('/')+1); + srcatt = srcatt.replace(last,'karte.png'); + image.setAttribute("src",srcatt); + } 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."); + + var image = document.getElementById("bkuimage"); + var srcatt = image.getAttribute("src"); + var last = srcatt.substring(srcatt.lastIndexOf('/')+1); + srcatt = srcatt.replace(last,'karte_deactivated.png'); + image.setAttribute("src",srcatt); + console.log("Local BKU NOT available") } } catch(e) {console.log("Local BKU detection is not possible! Msg: "+e);} 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 794145a2d..53c4f0d5d 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html @@ -12,7 +12,8 @@ Anmeldung mittels Bürgerkarte oder Handy-Signatur - + +

Anmeldung an: $OAName

@@ -37,19 +38,28 @@
- OnlineBKU + OnlineBKU + + + + +
+ + + + + + +
+ +
- HandyBKU + HandyBKU +
-
+ +

Anmeldung an: $OAName

@@ -37,19 +38,28 @@
- OnlineBKU + OnlineBKU + + + + +
+ + + + + + +
+ +
- HandyBKU + HandyBKU +
-
+ + + + + + + +Anmeldung mittels Bürgerkarte oder Handy-Signatur + + +
+
+

Anmeldung an: $OAName

+
+
+
+

$HEADER_TEXT

+
+
+
+
+ + + +
+
+
+
+ OnlineBKU +
+
+ HandyBKU +
+
+
+
+ + + + + + +
+
+ + + + +
+

Home Country Selection

+

+ + + i +

+
+ + +
+
+
+
+
+ + diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css index a334b258d..691166911 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css @@ -23,7 +23,7 @@ /*border-radius: 5px;*/ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit]{ font-size: 0.85em; /*border-radius: 7px;*/ margin-bottom: 25px; @@ -171,7 +171,7 @@ /* border-radius: 5px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit]{ font-size: 0.7em; min-width: 55px; /*min-height: 1.1em; @@ -210,7 +210,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 0.75em; min-width: 60px; /* min-height: 0.95em; @@ -248,7 +248,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 0.85em; /* min-height: 1.05em; border-radius: 7px; */ @@ -280,7 +280,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 0.9em; /* min-height: 1.2em; border-radius: 8px; */ @@ -313,7 +313,7 @@ /* border-radius: 6px; */ } - #bkuselectionarea input[type=button] { + #bkuselectionarea input[type=button],#bkuselectionarea input[type=submit] { font-size: 1.0em; /* min-height: 1.3em; border-radius: 10px; */ @@ -423,7 +423,7 @@ height: 25px; } - input[type=button] { + input[type=button],input[type=submit] { /* height: 11%; */ width: 70%; } @@ -464,9 +464,14 @@ text-align: right; } + #ssoSessionTransferBlock { + clear: both; + } + #stork { /*margin-bottom: 10px;*/ /* margin-top: 5px; */ + clear: both; } #mandateLogin { @@ -520,8 +525,9 @@ } .bkuimage { - width: 70%; + width: 60%; height: auto; + margin-bottom: 10%; } #mandate{ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js index a463bae65..ca920f63b 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js @@ -129,12 +129,14 @@ function isIE() { console.log("Browser is Chrome: "+checkIfBrowserIsChrome()); console.log("Browser is Safari: "+checkIfBrowserIsSafari()); console.log("Browser is Edge: "+checkIfBrowserIsEdge()); + console.log("Browser is Firefox(>51): " +checkIfBrowserIsFirefox()) var cnt = 0; if(checkIfBrowserIsChrome())cnt++; if(checkIfBrowserIsEdge())cnt++; if(checkIfBrowserIsSafari())cnt++; + if(checkIfBrowserIsFirefox())cnt++; if(cnt==0 || cnt>1)//cnt>1 means perhaps wrong detection return true; @@ -149,11 +151,25 @@ function isIE() { var button = document.getElementsByName("bkuButtonOnline")[0]; button.setAttribute("class","browserInfoButton"); button.setAttribute("title","Java wird nicht unterstützt, klicken für mehr Informationen."); - button.setAttribute("onClick","alert('Java wird von Ihrem Browser nicht unterstützt, ist jedoch für den Betrieb der Online Bürgerkartenumgebung notwendig.\\nWollen Sie dennoch die Online Bürgerkartenumgebung verwenden, wird zur Zeit Java noch von Firefox und MS Internet Explorer unterstützt. \\nAlternativ koennen Sie auch eine lokale Bürgerkartenumgebung verwenden, verfügbar unter www.buergerkarte.at.');"); + button.setAttribute("onClick","alert('Java wird von Ihrem Browser nicht unterstützt, ist jedoch für den Betrieb der Online Bürgerkartenumgebung notwendig.\\nWollen Sie dennoch die Online Bürgerkartenumgebung verwenden, wird zur Zeit Java noch von MS Internet Explorer unterstützt. \\nAlternativ koennen Sie auch eine lokale Bürgerkartenumgebung verwenden, verfügbar unter www.buergerkarte.at.');"); return false; } + function checkIfBrowserIsFirefox() { + var firefoxMarkerPos = navigator.userAgent.toLowerCase().indexOf('firefox'); + if (firefoxMarkerPos > -1) { + if (navigator.userAgent.toLowerCase().length >= (firefoxMarkerPos + 'firefox/'.length)) { + var ffversion = navigator.userAgent.toLowerCase().substring(firefoxMarkerPos + 8); + if (ffversion > 51) { + return true; + } + } else { + console.log("Browser looks like Firefox but has suspect userAgent string: " + navigator.userAgent.toLowerCase()); + } + } + return false; + } function checkIfBrowserIsChrome(){ var chrome_defined = !!window.chrome;//chrome object defined var webstore_defined = false; @@ -173,7 +189,44 @@ 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."); + + var image = document.getElementById("bkuimage"); + var srcatt = image.getAttribute("src"); + var last = srcatt.substring(srcatt.lastIndexOf('/')+1); + srcatt = srcatt.replace(last,'karte.png'); + image.setAttribute("src",srcatt); + + } 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."); + + var image = document.getElementById("bkuimage"); + var srcatt = image.getAttribute("src"); + var last = srcatt.substring(srcatt.lastIndexOf('/')+1); + srcatt = srcatt.replace(last,'karte_deactivated.png'); + image.setAttribute("src",srcatt); + + 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/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html index 32f0a7d4d..53c4f0d5d 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html @@ -12,7 +12,8 @@ Anmeldung mittels Bürgerkarte oder Handy-Signatur - + +

Anmeldung an: $OAName

@@ -37,19 +38,28 @@
- OnlineBKU + OnlineBKU + + + + +
+ + + + + + +
+ +
- HandyBKU + HandyBKU +
-
+