aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-frontend-resources/src
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2017-03-16 11:44:26 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2017-03-16 11:44:26 +0100
commit93acb35fdf7ca1118c5955a3bfa727619a26d178 (patch)
tree0086839f501269eea92697e31c21eb85884a813a /id/server/moa-id-frontend-resources/src
parent3474af93a3436a334a1e7e903e6f6dcc5fdb774c (diff)
downloadmoa-id-spss-93acb35fdf7ca1118c5955a3bfa727619a26d178.tar.gz
moa-id-spss-93acb35fdf7ca1118c5955a3bfa727619a26d178.tar.bz2
moa-id-spss-93acb35fdf7ca1118c5955a3bfa727619a26d178.zip
update default BKU selection templates to remove OnlineBKU
Diffstat (limited to 'id/server/moa-id-frontend-resources/src')
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css22
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js57
-rw-r--r--id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html33
3 files changed, 91 insertions, 21 deletions
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 @@
<title>Anmeldung mittels Bürgerkarte oder Handy-Signatur</title>
</head>
-<body onload="onChangeChecks();checkIfBrowserSupportsJava();" onresize="onChangeChecks();">
+<!--body onload="onChangeChecks();checkIfBrowserSupportsJava();" onresize="onChangeChecks();"-->
+<body onload="onChangeChecks();" onresize="onChangeChecks();">
<div id="page">
<div id="page1" class="case selected-case" role="main">
<h2 class="OA_header" role="heading">Anmeldung an: $OAName</h2>
@@ -37,19 +38,28 @@
</div>
<div id="bkuselectionarea">
<div id="bkukarte">
- <img id="bkuimage" class="bkuimage" src="$contextPath/img/karte.png"
- alt="OnlineBKU" /> <input name="bkuButtonOnline" type="button"
- onClick="bkuOnlineClicked();" tabindex="2" role="button"
- value="Karte" />
+ <img id="bkuimage" class="bkuimage" src="$contextPath/img/karte.png" alt="OnlineBKU" />
+
+ <!-- Remove support for Online BKU and swith the card button to local BKU-->
+ <!--input name="bkuButtonOnline" type="button" onClick="bkuOnlineClicked();" tabindex="2" role="button" value="Karte" /-->
+
+ <form method="get" id="moaidform" action="$contextPath$submitEndpoint" class="verticalcenter" target="_parent">
+ <input type="hidden" name="bkuURI" value="$bkuLocal" />
+ <input type="hidden" name="useMandate" id="useMandate" />
+ <input type="hidden" name="SSO" id="useSSO" />
+ <input type="hidden" name="ccc" id="ccc" />
+ <input type="hidden" name="pendingid" value="$pendingReqID" />
+ <input type="submit" value=" Karte " 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>
<div id="bkuhandy">
- <img class="bkuimage" src="$contextPath/img/handysign.png"
- alt="HandyBKU" /> <input name="bkuButtonHandy" type="button"
- onClick="bkuHandyClicked();" tabindex="3" role="button"
- value="HANDY" />
+ <img class="bkuimage" src="$contextPath/img/handysign.png" alt="HandyBKU" />
+ <input name="bkuButtonHandy" type="button" onClick="bkuHandyClicked();" tabindex="3" role="button" value="HANDY" />
</div>
</div>
- <div id="localBKU">
+ <!--div id="localBKU">
<form method="get" id="moaidform" action="$contextPath$submitEndpoint"
class="verticalcenter" target="_parent">
<input type="hidden" name="bkuURI" value="$bkuLocal" />
@@ -60,7 +70,8 @@
<input type="submit" value=" Lokale Bürgerkartenumgebung " tabindex="4"
role="button" onclick="setMandateSelection();">
</form>
- </div>
+ <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 -->
<!--div id="ssoSessionTransferBlock">