From 731ab39b8ef05a4e84b72fb4243d59c9f6dd48cb Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 23 Jan 2018 14:23:39 +0100 Subject: update mostly all GUI forms to split JavaScript and CSS from html code to support "Content Security-Policy" http headers --- .../templates/iframeLBKUdetectSPSpecific.html | 4 ++- .../resources/templates/javascript_tempalte.js | 20 +++++++++--- .../main/resources/templates/loginFormFull.html | 19 ++++++----- .../src/main/resources/templates/redirectForm.html | 28 +++++++++++++--- .../src/main/resources/templates/slo_template.html | 37 ++++++---------------- 5 files changed, 60 insertions(+), 48 deletions(-) (limited to 'id/server/moa-id-frontend-resources/src/main/resources/templates') diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/iframeLBKUdetectSPSpecific.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/iframeLBKUdetectSPSpecific.html index 79a217946..aadc3d4cf 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/iframeLBKUdetectSPSpecific.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/iframeLBKUdetectSPSpecific.html @@ -2,8 +2,10 @@ BKU-Erkennung + + - +
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 0c1f6a561..cc4714006 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 @@ -126,13 +126,12 @@ function isIE() { } } } - function onChangeChecks() { + function onChangeChecks() { if (self.innerWidth < 650) { document.getElementById("moaidform").setAttribute("target","_parent"); } else { document.getElementById("moaidform").removeAttribute("target"); } - } function checkIfBrowserSupportsJava(){ @@ -234,8 +233,21 @@ function isIE() { console.log("Local BKU NOT available") } } catch(e) {console.log("Local BKU detection is not possible! Msg: "+e);} - - } + + } + function setUseMandateFlag(e) { + /*document.getElementById("mandateCheckBox").setAttribute("aria-checked", document.getElementById("mandateCheckBox").checked);*/ + e.setAttribute("aria-checked", e.checked); + } + + document.addEventListener('resize', onChangeChecks); + document.addEventListener('DOMContentLoaded', function () { + document.querySelector('#mandateCheckBox').addEventListener('click', setUseMandateFlag); + document.querySelector('#moaidform>input[type=submit]').addEventListener('click', setMandateSelection); + document.querySelector('#bkuhandy>input[type=button]').addEventListener('click', bkuHandyClicked); + document.querySelector('#stork button[type=button]').addEventListener('click', storkClicked); + onChangeChecks(); + }); /* function setSSOSelection() { document.getElementById("useSSO").value = "false"; 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 c4da51dc1..5a4ca66b7 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 @@ -13,7 +13,7 @@ Anmeldung mittels Bürgerkarte oder Handy-Signatur - +

Anmeldung an: $OAName

@@ -26,8 +26,7 @@
+ id="mandateCheckBox" class="verticalcenter" role="checkbox" $MANDATECHECKED> - +
HandyBKU - +
- @@ -88,7 +87,7 @@ - + i

diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html index ac3242c89..a27a7ba10 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html @@ -1,13 +1,31 @@ - + + +
- - CLICK to perform a - redirect back to Online Application +
+ + + +
+
+
+

+ >You get redirected ... +

+
+ + +
+
+
+
diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html index b3eb18082..4f86f9f14 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html @@ -6,37 +6,12 @@ #if($timeoutURL) - + #end Single LogOut Vorgang ... - -#if($timeoutURL) - -#else - -#end +
#end @@ -77,7 +57,7 @@