aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-09-23 15:12:15 +0000
committerrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-09-23 15:12:15 +0000
commit1726ef5cd41fbe630c0083079ee723836ffc5794 (patch)
tree3493b634226c0ebea20ec2178f785f7349d9ee8f
parent2eb9a696b20046eedbdc856a63dc11bc42763957 (diff)
downloadpdf-as-3-1726ef5cd41fbe630c0083079ee723836ffc5794.tar.gz
pdf-as-3-1726ef5cd41fbe630c0083079ee723836ffc5794.tar.bz2
pdf-as-3-1726ef5cd41fbe630c0083079ee723836ffc5794.zip
Comprehensive changes due to reorganization of user interface. The form was organized within div's. Many JavaScripts added for functionality and styling reasons. See the code for further explanations.
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@823 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r--pdf-as-web/src/main/webapp/jsp/signupload.jsp1075
1 files changed, 828 insertions, 247 deletions
diff --git a/pdf-as-web/src/main/webapp/jsp/signupload.jsp b/pdf-as-web/src/main/webapp/jsp/signupload.jsp
index 9bc675f..ebfa339 100644
--- a/pdf-as-web/src/main/webapp/jsp/signupload.jsp
+++ b/pdf-as-web/src/main/webapp/jsp/signupload.jsp
@@ -1,296 +1,877 @@
-<%@page import="at.gv.egiz.pdfas.web.servlets.UpdateFormServlet"%>
<%@page import="at.gv.egiz.pdfas.web.FormFields"%>
<%@page import="at.gv.egiz.pdfas.web.session.SessionAttributes"%>
<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
<%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %>
<%@ page import="at.gv.egiz.pdfas.web.i18n.LanguageDecoratorMapper"%>
<%@ page import="org.apache.commons.lang.BooleanUtils"%>
+<%@ page import="at.gv.egiz.pdfas.web.i18n.LocaleParamFilter" %>
+<%@ page import="java.util.Locale" %>
+<%@ page import="at.gv.egiz.pdfas.web.servlets.SignServlet" %>
+<%@ page import="at.gv.egiz.pdfas.web.helper.LocalRequestHelper" %>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<%@ include file="/jsp/language.jsp" %>
-<%@ include file="language.jsp" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
+
+
<%
- boolean testMode = request.getContextPath().startsWith("/test-");
- boolean forceTextualForMocca = false;
- final String SIGNATUREPROFILE_DE_nonPDFa = "SIGNATURBLOCK_DE";
- final String SIGNATUREPROFILE_EN_nonPDFa = "SIGNATURBLOCK_EN";
- final String SIGNATUREPROFILE_DE_PDFa = "SIGNATURBLOCK_DE_PDFA";
- final String SIGNATUREPROFILE_EN_PDFa = "SIGNATURBLOCK_EN_PDFA";
+ session = request.getSession();
- %>
- <title>
+ session.removeAttribute(SessionAttributes.DOWNLOAD_URL_FOR_SIGNED_PDF_DOCUMENT);
+ session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT);
+
+ //Check if application is started within an iframe from an extern application
+ String extern = (String)request.getParameter("extern");
+ boolean startedFromIFrame = false;
+
+ if (extern !=null) {
+ if (extern.equals("yes")) {
+ startedFromIFrame = true;
+ }
+ }
+
+ //When Change Language link is hit, three parameters are passed with a hidden form
+ //so that the settings keep the same. Check if this parameters are passed...
+ String source_mode_request = (String)request.getParameter("source_mode");
+ String text_request = (String)request.getParameter("text");
+ String lang_request = (String)request.getParameter("newlanguage");
+
+ if (lang_request!=null) {
+ if (source_mode_request.equals("file")) {
+ session.setAttribute(SignServlet.SUBMITFORM_SOURCE_KEY, FormFields.VALUE_SOURCE_FILE);
+ }
+ else {
+ session.setAttribute(SignServlet.SUBMITFORM_SOURCE_KEY, FormFields.VALUE_SOURCE_FREETEXT);
+ session.setAttribute(SignServlet.SUBMITFORM_FREETEXT_KEY, text_request);
+ }
+ if (lang_request.equals("de")) {
+ session.setAttribute(SessionAttributes.LANGUAGE, "en");
+ }
+ else {
+ session.setAttribute(SessionAttributes.LANGUAGE, "de");
+ }
+
+ }
+
+
+ boolean testMode = request.getContextPath().startsWith("/test-");
+ //boolean forceTextualForMocca = false;
+
+ String requestLang = (String)request.getParameter("lang");
+ String sessionLang = (String)session.getAttribute(SessionAttributes.LANGUAGE);
+ String language = "";
+
+ //If language within session...
+ if (sessionLang!=null) {
+ //But if language also changed by clicking the change language link
+ //or passed as parameter with the URL...
+ if (requestLang!=null) {
+ //If language has changed, change it also within session
+ if (!sessionLang.equals(requestLang)) {
+ session.setAttribute(SessionAttributes.LANGUAGE, requestLang);
+ }
+ //else do nothing
+ }
+ //else no change
+ }
+ //Else still no language within session
+ else {
+ //But if language changed by clicking the change language link
+ //or passed as parameter with the URL...
+ if (requestLang!=null) {
+ if (requestLang.equals("de")) {
+ session.setAttribute(SessionAttributes.LANGUAGE,"de");
+ }
+ else {
+ session.setAttribute(SessionAttributes.LANGUAGE,"en");
+ }
+ }
+ //No language here. Set to german
+ else {
+ session.setAttribute(SessionAttributes.LANGUAGE,"de");
+ }
+ }
+
+ language = (String)session.getAttribute(SessionAttributes.LANGUAGE);
+
+
+ boolean german=true;
+
+ if (language!=null) {
+ if (language.equals("en")) {
+ german = false;
+ }
+ }
+
+ String sign_freetext = "";
+
+ //Get the previous settings if user hitted back or back link
+ //Many of this settings do not apply anymore
+ String sign_mode = (String)session.getAttribute(SignServlet.SUBMITFORM_SIGNATURE_MODE_KEY);
+ String source_mode = (String)session.getAttribute(SignServlet.SUBMITFORM_SOURCE_KEY);
+ String sign_type = (String)session.getAttribute(SignServlet.SUBMITFORM_SIGNATURE_TYPE_KEY);
+ String sign_pdfa = (String)session.getAttribute(SignServlet.SUBMITFORM_PDFA_KEY);
+ String sign_note = (String)session.getAttribute(SignServlet.SUBMITFORM_NOTE_KEY);
+ sign_freetext = (String)session.getAttribute(SignServlet.SUBMITFORM_FREETEXT_KEY);
+
+ if (german) {
+ %>
+ <fmt:setLocale value="de"/>
+ <% } else { %>
+ <fmt:setLocale value="en"/>
+ <% } %>
+ <title>
<%
- if (testMode) {
+ if (testMode) {
%>
<fmt:message key="test.common.title"/>
<% } else { %>
<fmt:message key="common.title"/>
<% } // end if %>
</title>
- <% session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); %>
+
+ <%
+ //If application called within an IFrame from an external application
+ //choose template and set session attribute
+ if (!startedFromIFrame) {
+ session.setAttribute("extern", "no");
+ if (german) {
+ %>
+ <meta name="decorator" content="production_de" />
+ <link rel="stylesheet" type="text/css" href="https://www.buergerkarte.at/test-pdf-as/css/pdfas-styles.css" />
+ <% } else { %>
+ <meta name="decorator" content="production_en" />
+ <link rel="stylesheet" type="text/css" href="https://www.buergerkarte.at/test-pdf-as/css/pdfas-styles.css" />
+ <% }
+ } else {
+ session.setAttribute("extern", "yes");
+ %>
+ <link rel="stylesheet" type="text/css" href="https://www.buergerkarte.at/test-pdf-as/css/extern-styles.css" />
+ <% } %>
+
+
+ <meta http-equiv="pragma" content="no-cache,no-store,private,must-revalidate,max-stale=0,post-check=0,pre-check=0"/>
+ <meta http-equiv="cache-control" content="no-cache,no-store,must-revalidate,max-age=-1"/>
+ <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT"/>
+
<script language="javascript" type="text/javascript">
- <!--
- function updateForm() {
- var updateform = document.getElementById('updateform');
+
+ //Check the user inputs when sign preview is choosed
+ function previewForm() {
var submitform = document.getElementById('submitform');
-
- updateform.<%= FormFields.FIELD_SIGNATURE_TYPE %>.value = submitform.<%= FormFields.FIELD_SIGNATURE_TYPE %>.value;
- updateform.<%= FormFields.FIELD_MODE %>.value = submitform.<%= FormFields.FIELD_MODE %>.value;
- updateform.<%= FormFields.FIELD_CONNECTOR %>.value = submitform.<%= FormFields.FIELD_CONNECTOR %>.value;
- updateform.<%= FormFields.FIELD_PDFA_ENABLED %>.value = (submitform.<%= FormFields.FIELD_PDFA_ENABLED %>.checked == true);
- updateform.<%= FormFields.FIELD_SOURCE %>.value = submitform.<%= FormFields.FIELD_SOURCE %>.value;
- if (submitform.<%= FormFields.FIELD_FREETEXT %>) {
- updateform.<%= FormFields.FIELD_FREETEXT %>.value = submitform.<%= FormFields.FIELD_FREETEXT %>.value;
+ if (submitform.source_filefreetext.selectedIndex=='0') {
+ if (!submitform.file.value) {
+ alert('<fmt:message key="signupload.documentnotselected.preview"/>');
+ return (false);
+ }
+ }
+ else {
+ if (!submitform.freetext.value) {
+ alert('<fmt:message key="signupload.nofreetext.preview"/>');
+ return (false);
+ }
}
- updateform.submit();
- return(false);
+ submitform.action = "<%=request.getContextPath()%>/SignPreview";
+ submitform.target = "_self";
+ return(true);
}
- function submitForm(preview) {
+
+ //Check the user inputs when sign is choosed
+ function submitForm(button) {
var submitform = document.getElementById('submitform');
- if (submitform.fileupload) {
- // file
- if (!submitform.fileupload.value) {
- if (preview) {
- alert('<fmt:message key="signupload.documentnotselected.preview"/>');
- } else {
- alert('<fmt:message key="signupload.documentnotselected"/>');
- }
- return(false);
+ //If file is choosed...
+ if (submitform.source_filefreetext.selectedIndex=='0') {
+ if (!submitform.file.value) {
+ document.getElementById('error').style.display='block';
+ document.getElementById('errordocument').style.display='block';
+ document.getElementById('errorfreetext').style.display='none';
+ document.getElementById('fakefile').style.borderColor='#ff0000';
+ document.getElementById('fakefile').style.borderStyle='solid';
+ document.getElementById('fakefile').style.borderWidth='2px';
+ document.getElementById('errorspace').style.display='block';
+ return (false);
}
- } else {
- // freetext
+ }
+ //If freetext is choosed...
+ else {
if (!submitform.freetext.value) {
- if (preview) {
- alert('<fmt:message key="signupload.nofreetext.preview"/>');
- } else {
- alert('<fmt:message key="signupload.nofreetext"/>');
+ document.getElementById('error').style.display='block';
+ document.getElementById('errorfreetext').style.display='block';
+ document.getElementById('errordocument').style.display='none';
+ document.getElementById('freetext').style.borderColor='#ff0000';
+ document.getElementById('freetext').style.borderStyle='solid';
+ document.getElementById('freetext').style.borderWidth='2px';
+ document.getElementById('errorspace').style.display='block';
+ return (false);
+ }
+ }
+
+ submitform.action = "<%=request.getContextPath()%>/Sign";
+
+ //If local bku is choosed target of the form is not the IFrame
+ if (button.name == "localbku") {
+ submitform.target = "_self";
+ }
+ else {
+ //Also if application is started within an IFrame the target is not another IFrame
+ if (<%=startedFromIFrame%>==true) {
+ submitform.target = "_self";
+ }
+ else {
+ document.getElementById('sign').style.display = 'none';
+ document.getElementById('signiframe').style.display = 'block';
+ document.getElementById('signiframe').style.height = document.getElementById('signaturesettings').offsetHeight+'px';
+ if (document.getElementById('descriptionbeforedocument').style.display=='block') {
+ document.getElementById('descriptionbeforedocument').style.display='none';
+ }
+ else {
+ document.getElementById('descriptionbeforefreetext').style.display='none';
+ }
+ document.getElementById('descriptionduring').style.display='block';
+ document.getElementById('sprachlink').style.display = 'none';
+ document.getElementById('sprachlinkdeaktiviert').style.display= 'block';
+ if (document.getElementById('error').style.display=='block') {
+ document.getElementById('error').style.display='none';
+ if (document.getElementById('errordocument').style.display=='block') {
+ document.getElementById('errordocument').style.display='none';
+ document.getElementById('errorspace').style.display='none';
+ document.getElementById('fileupload').style.borderColor='#e6f2fa';
+ document.getElementById('fileupload').style.borderStyle='solid';
+ document.getElementById('fileupload').style.borderWidth='2px';
+ }
+ else {
+ document.getElementById('error').style.display='none';
+ document.getElementById('errorfreetext').style.display='none';
+ document.getElementById('errorspace').style.display='none';
+ document.getElementById('freetext').style.borderColor='#e6f2fa';
+ document.getElementById('freetext').style.borderStyle='solid';
+ document.getElementById('freetext').style.borderWidth='2px';
+ }
}
- return(false);
}
}
- if (preview) {
- submitform.<%= FormFields.FIELD_PREVIEW %>.value='true';
- } else {
- submitform.<%= FormFields.FIELD_PREVIEW %>.value='false';
+ return (true);
+ }
+
+ //Function for changing the IFrame position and size when the error has to be
+ //shown within the IFrame to no force a reload of the page
+ function moveErrorIFrame(object) {
+ var signSettings = document.getElementById('signaturesettings');
+ var signButtons = document.getElementById('sign');
+ var signIframe = document.getElementById('signiframe');
+ var signIframeIntern = document.getElementById('signiframeintern');
+ var inhalt = document.getElementById('submitform');
+
+ if (document.getElementById('descriptionbeforedocument').style.display=='block') {
+ document.getElementById('descriptionbeforedocument').style.display='none'
}
- return(true);
+ if (document.getElementById('descriptionbeforefreetext').style.display=='block') {
+ document.getElementById('descriptionbeforefreetext').style.display='none'
+ }
+ if (document.getElementById('descriptionduring').style.display=='block') {
+ document.getElementById('descriptionduring').style.display='none'
+ }
+ document.getElementById('descriptionerror').style.display='block';
+
+ inhalt.removeChild(signSettings);
+ inhalt.removeChild(signButtons);
+
+ signIframe.className='links';
+ signIframeIntern.className='linksinhaltmargin';
+
+ document.getElementById('iframe').width = '460px';
+
+ document.getElementById('downloadsignbuttons').style.display='block';
+ document.getElementById('downloadsignbuttons').style.height = document.submitform.height_sign_div.value;
+
+ document.getElementById('localbku').style.display='none';
+ document.getElementById('backlink').style.display='none';
}
- -->
- </script>
- <%
- // PRESETS
- // signature device
- String device = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY);
- if (device == null) {
- device = Constants.SIGNATURE_DEVICE_MOC;
- session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY, device);
- }
- // signature mode
- String mode = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY);
- if (forceTextualForMocca && Constants.SIGNATURE_DEVICE_MOC.equals(device)) {
- mode = FormFields.VALUE_MODE_TEXTUAL;
- session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY, mode);
- }
- if (mode == null) {
- mode = FormFields.VALUE_MODE_BINARY;
- session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY, mode);
- }
-
- // PDF/A-1b
- boolean pdfa = BooleanUtils.toBoolean((String) session.getAttribute(UpdateFormServlet.UPLOADFORM_PDFA_KEY));
- String TYPE_EN;
- String TYPE_DE;
- if (pdfa) {
- TYPE_EN = SIGNATUREPROFILE_EN_PDFa;
- TYPE_DE = SIGNATUREPROFILE_DE_PDFa;
- } else {
- TYPE_EN = SIGNATUREPROFILE_EN_nonPDFa;
- TYPE_DE = SIGNATUREPROFILE_DE_nonPDFa;
- }
-
- // signature type
- String type = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY);
- if (type == null) {
- Locale locale = (Locale) session.getAttribute(LocaleParamFilter.LOCALE_SESSION_KEY);
- if (locale == null) {
- locale = request.getLocale();
- }
- type = Locale.GERMAN.getLanguage().equals(locale.getLanguage()) ? TYPE_DE : TYPE_EN;
- } else {
- if (pdfa) {
- if (SIGNATUREPROFILE_DE_nonPDFa.equals(type)) {
- type = SIGNATUREPROFILE_DE_PDFa;
- } else if (SIGNATUREPROFILE_EN_nonPDFa.equals(type)) {
- type = SIGNATUREPROFILE_EN_PDFa;
- }
- } else {
- if (SIGNATUREPROFILE_DE_PDFa.equals(type)) {
- type = SIGNATUREPROFILE_DE_nonPDFa;
- } else if (SIGNATUREPROFILE_EN_PDFa.equals(type)) {
- type = SIGNATUREPROFILE_EN_nonPDFa;
- }
- }
- }
- session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY, type);
-
- // source
- String source = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SOURCE_KEY);
- if (source == null) {
- source = FormFields.VALUE_SOURCE_FILE;
- }
- session.setAttribute(UpdateFormServlet.UPLOADFORM_SOURCE_KEY, source);
- boolean freeText = FormFields.VALUE_SOURCE_FREETEXT.equals(source);
-
- // freetext
- String freeTextValue = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_FREETEXT_KEY);
- if (freeTextValue == null) {
- freeTextValue = "";
- }
- session.setAttribute(UpdateFormServlet.UPLOADFORM_FREETEXT_KEY, freeTextValue);
- %>
+ //Function to show the textarea if freetext mode is choosen or the file upload
+ //field if file is choosen
+ function showTextarea() {
+ var file = document.submitform.source.options[0].selected;
+ if (!file) {
+ document.getElementById('freetext').style.display='block';
+ document.getElementById('fileupload').style.display='none';
+ document.getElementById('fakefile').style.display='none';
+ document.getElementById('labeldocument').style.display='none';
+ document.getElementById('labeltext').style.display='block';
+ document.getElementById('descriptionbeforedocument').style.display='none';
+ document.getElementById('descriptionbeforefreetext').style.display='block';
+ if (document.getElementById('error').style.display=='block') {
+ document.getElementById('error').style.display='none';
+ document.getElementById('errordocument').style.display='none';
+ document.getElementById('errorspace').style.display='none';
+ document.getElementById('fakefile').style.borderColor='#e6f2fa';
+ }
+ }
+ else {
+ document.getElementById('freetext').style.display='none';
+ document.getElementById('fileupload').style.display='block';
+ document.getElementById('fakefile').style.display='block';
+ document.getElementById('labeldocument').style.display='block';
+ document.getElementById('labeltext').style.display='none';
+ document.getElementById('descriptionbeforedocument').style.display='block';
+ document.getElementById('descriptionbeforefreetext').style.display='none';
+ if (document.getElementById('error').style.display=='block') {
+ document.getElementById('error').style.display='none';
+ document.getElementById('errorfreetext').style.display='none';
+ document.getElementById('errorspace').style.display='none';
+ document.getElementById('freetext').style.borderColor='#e6f2fa';
+ }
+ }
+ //showAdvice();
+ }
+
+ //Shows the advice when for example choosing textual signature. Not used anymore
+ /*function showAdvice() {
+ var file = document.submitform.source.options[0].selected;
+ //var textual = document.submitform.textual.checked;
+ //var binary = document.submitform.binary.checked;
+ var pdfa = document.submitform.pdfa.checked;
+
+ var textual = false;
+ var binary = true;
+
+ var hinweise = new Array("hinweispdfa", "hinweistextfile", "hinweistext", "hinweistextfilepdfa", "hinweistextpdfa");
+
+ //Check which hinweis now showed
+ for (var i=0; i<hinweise.length; i++) {
+ if (document.getElementById(hinweise[i]).style.display=='block') {
+ document.getElementById(hinweise[i]).style.display='none';
+ document.getElementById('space').style.display='block';
+ break;
+ }
+ }
+
+ //Check which hinweis to show
+ if ((pdfa) || ((textual) && (!binary))) {
+ if ((pdfa) && (!textual) && (binary)) {
+ document.getElementById('hinweispdfa').style.display='block';
+ }
+ if ((textual) && (!binary) && (file) && (!pdfa)) {
+ document.getElementById('hinweistextfile').style.display='block';
+ }
+ if ((textual) && (!binary) && (!file) && (!pdfa)) {
+ document.getElementById('hinweistext').style.display='block';
+ }
+ if ((pdfa) && (textual) && (!binary) && (file)) {
+ document.getElementById('hinweistextfilepdfa').style.display='block';
+ }
+ if ((pdfa) && (textual) && (!binary) && (!file)) {
+ document.getElementById('hinweistextpdfa').style.display='block';
+ }
+ document.getElementById('space').style.display='block';
+ }
+ }*/
+
+ //Function to display the file upload field equally for each browser
+ function initFileUploads() {
+ var W3CDOM = (document.createElement && document.getElementsByTagName);
+ if (!W3CDOM) return;
+
+ var fakeFileUpload = document.createElement('div');
+ fakeFileUpload.className = 'fakefile';
+ fakeFileUpload.id = 'fakefile';
+
+ if (document.submitform.source.options[0].selected) {
+ fakeFileUpload.style.display='block';
+ }
+ else {
+ fakeFileUpload.style.display='none';
+ }
+ var input = document.createElement('input');
+ input.style.verticalAlign = 'top';
+ fakeFileUpload.appendChild(input);
+
+ var img = document.createElement('img');
+ img.src = 'https://www.buergerkarte.at/test-pdf-as/images/durchsuchen.png';
+ img.id = 'buttonimage';
+
+ var fakeButton = document.createElement('input');
+ fakeButton.type = 'submit';
+
+ if (<%=german%>==true) {
+ fakeButton.value = 'Durchsuchen';
+ }
+ else {
+ fakeButton.value = 'Browse';
+ }
+ fakeButton.id = 'fakebutton';
+ fakeButton.name = 'fakebutton';
+ fakeButton.alt = 'Choose file';
+ fakeButton.style.verticalAlign = 'top';
+
+ //fakeFileUpload.appendChild(img);
+ fakeFileUpload.appendChild(fakeButton);
+
+ var normalFileUpload = document.getElementById('fileupload');
+ normalFileUpload.className = 'fileuploadinvisible';
+ var clone = fakeFileUpload.cloneNode(true);
+ normalFileUpload.parentNode.appendChild(clone);
+ normalFileUpload.relatedElement = clone.getElementsByTagName('input')[0];
+ normalFileUpload.onchange = normalFileUpload.onmouseout = function () {
+ this.relatedElement.value = this.value;
+ }
+ }
+
+ //Check the height of the IFrame to be shown for adjusting the high
+ //of the currently showed div's as well as of those of other pages
+ function checkHeight() {
+ var sign = document.getElementById('sign');
+ var signiframe = document.getElementById('signiframe');
+ var localbku = document.getElementById('localbku');
+ var signaturesettings = document.getElementById('signaturesettings');
+ sign.style.display='none';
+ signiframe.style.display='block';
+ localbku.style.display='block';
+ var height = signiframe.offsetHeight;
+ sign.style.height=height+'px';
+ signaturesettings.style.height=height+'px';
+ signiframe.style.display='none';
+ localbku.style.display='none';
+ sign.style.display='block';
+ document.submitform.<%=FormFields.FIELD_HEIGHT_SIGNDIV%>.value=height+'px';
+ }
+
+ //Show the fake image/button as it would be focused (mouse over)
+ function focusButton() {
+ document.getElementById('buttonimage').src = 'https://www.buergerkarte.at/test-pdf-as/images/durchsuchen_aktiv.png';
+ }
+
+ //Show the fake image/button as it would be unfocused (mouse out)
+ function unfocusButton() {
+ document.getElementById('buttonimage').src = 'https://www.buergerkarte.at/test-pdf-as/images/durchsuchen.png';
+ }
+
+ //Change some size settings when IE7 is found
+ function detectBrowser() {
+ if ((navigator.appName.indexOf('Internet Explorer')!=-1) && (navigator.appVersion.indexOf('MSIE 7.0')!=-1)) {
+ document.getElementById('signintern').className='rechtsinhaltinternetexplorer';
+ document.getElementById('signiframeintern').className='rechtsinhaltinternetexplorer';
+ document.getElementById('downloadsignbuttonsintern').className='rechtsinhaltinternetexplorer';
+ document.getElementById('signaturesettingsintern').className='linksinhaltinternetexplorer';
+
+ var stringHeight = document.submitform.<%=FormFields.FIELD_HEIGHT_SIGNDIV%>.value;
+ var iediff = 25;
+ var height = parseInt(stringHeight)+iediff;
+ height = height + 'px';
+ document.getElementById('sign').style.height = height;
+ document.getElementById('signaturesettings').style.height = height;
+ document.getElementById('signiframe').style.height = height;
+ document.getElementById('downloadsignbuttons').style.height = height;
+ }
+ }
+
+ </script>
+
</head>
<body>
-<h1>
- <%
- if (testMode) {
- %>
- <fmt:message key="test.common.title"/>
- <% } else { %>
- <fmt:message key="common.title"/>
- <% } // end if %>
-</h1>
-<h2 align="left">
- <% if (freeText) { %>
- <fmt:message key="signupload.heading2.freetext"/>
- <% } else { %>
- <fmt:message key="signupload.heading2"/>
+
+
+ <% if (!startedFromIFrame) { %>
+ <h1 id="heading1" style="display:block">
+ <%
+ if (testMode) {
+ %>
+ <fmt:message key="test.common.title"/>
+ <% } else { %>
+ <fmt:message key="common.title"/>
+ <% } // end if %>
+ </h1>
+
+ <h1 id="heading1download" style="display:none">
+ <fmt:message key="download.title"/>
+ </h1>
<% } %>
-</h2>
-<div class="pdfasnote">
- <% if (freeText) { %>
- <fmt:message key="signupload.selectfilenote.freetext"/>
- <% } else { %>
- <fmt:message key="signupload.selectfilenote"/>
+
+ <!-- Error text possibly shown when no text or file provided -->
+ <div id="error" class="error" style="display:none">
+ <div><fmt:message key="signupload.leftblank"/>:</div>
+ <li id="errordocument" style="display:none"><fmt:message key="signupload.documentnotselected"/></li>
+ <li id="errorfreetext" style="display:none"><fmt:message key="signupload.nofreetext"/></li>
+ </div>
+ <div id="errorspace" class="pdfasverticalspace" style="display:none"></div>
+
+
+ <!-- <div id="descriptionbefore" style="display:block">
+ <fmt:message key="signupload.sign"/>
+ </div>
+ <div id="descriptionduring" style="display:none">
+ <fmt:message key="signupload.signing"/>
+ </div> -->
+
+
+ <% if (source_mode!=null) {
+ if (source_mode.contains(FormFields.VALUE_SOURCE_FILE)) { %>
+ <div id="descriptionbeforedocument" style="display:block">
+ <fmt:message key="signupload.sign.document"/>
+ </div>
+ <div id="descriptionbeforefreetext" style="display:none">
+ <fmt:message key="signupload.sign.freetext"/>
+ </div>
+ <% } else { %>
+ <div id="descriptionbeforedocument" style="display:none">
+ <fmt:message key="signupload.sign.document"/>
+ </div>
+ <div id="descriptionbeforefreetext" style="display:block">
+ <fmt:message key="signupload.sign.freetext"/>
+ </div>
+ <% }
+ } else { %>
+ <div id="descriptionbeforedocument" style="display:block">
+ <fmt:message key="signupload.sign.document"/>
+ </div>
+ <div id="descriptionbeforefreetext" style="display:none">
+ <fmt:message key="signupload.sign.freetext"/>
+ </div>
<% } %>
-</div>
-<form name="updateform" id="updateform" accept-charset="UTF-8" method="post" action="<%= request.getContextPath() %>/UpdateForm">
- <input type="hidden" name="<%= FormFields.FIELD_SIGNATURE_TYPE %>" value=""/>
- <input type="hidden" name="<%= FormFields.FIELD_MODE %>" value=""/>
- <input type="hidden" name="<%= FormFields.FIELD_CONNECTOR %>" value=""/>
- <input type="hidden" name="<%= FormFields.FIELD_PDFA_ENABLED %>" value=""/>
- <input type="hidden" name="<%= FormFields.FIELD_SOURCE %>" value=""/>
- <% if (freeText) { %>
- <input type="hidden" name="<%= FormFields.FIELD_FREETEXT %>" value=""/>
- <% } // end if %>
-</form>
-<form name="submitform" id="submitform"
- enctype="multipart/form-data"
- accept-charset="UTF-8"
- method="post"
- action="<%= request.getContextPath() %>/Sign">
- <table border="0" cellspacing="0" cellpadding="4" id="pdfasupperformtable">
- <tr>
- <td align="left" nowrap="nowrap"><label><fmt:message key="signupload.signaturetype"/>:</label></td>
- <td align="left">
- <select class="field" name="<%= FormFields.FIELD_SIGNATURE_TYPE %>" onchange="return updateForm();">
- <option value="<%= TYPE_DE %>" <%= TYPE_DE.equals(type) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.signaturetype.signaturblock.de"/></option>
- <option value="<%= TYPE_EN %>" <%= TYPE_EN.equals(type) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.signaturetype.signaturblock.en"/></option>
- </select>
- <!-- %= // FormFields.generateTypeSelectBox() % -->
- <span style="padding-left: 20px; 1px solid black;"></span>
- <input type="checkbox" name="<%= FormFields.FIELD_PDFA_ENABLED %>" value="true" <%= pdfa ? "checked=\"checked\"" : "" %> onclick="return updateForm();"/>&nbsp;<fmt:message key="signupload.pdfa"/>
- </td>
- </tr>
- <tr>
- <td align="left" nowrap="nowrap"><label><fmt:message key="signupload.signaturemode"/>:</label></td>
- <td align="left">
- <% if (forceTextualForMocca && Constants.SIGNATURE_DEVICE_MOC.equals(device)) {%>
- <fmt:message key="common.textual"/>
- <input type="hidden" name="<%= FormFields.FIELD_MODE %>" value="<%= FormFields.VALUE_MODE_TEXTUAL %>"/>
+
+ <div id="descriptionduring" style="display:none">
+ <fmt:message key="signupload.signing"/>
+ </div>
+ <div id="descriptionerror" style="display:none">
+ <fmt:message key="error.description"/>
+ </div>
+
+
+ <div class="pdfasverticalspace"></div>
+
+ <div id="inhalt">
+
+ <!-- Form with the signature settings. Most of them are just disabled because may be they are not more needed -->
+ <form name="submitform" id="submitform" method="post" enctype="multipart/form-data" accept-charset="UTF-8" action="<%= request.getContextPath() %>/Sign" target="iframe">
+ <div class="links" id="signaturesettings" style="display:block">
+ <div class="linksinhalt" id="signaturesettingsintern">
+ <!-- <div class="linkslabelkurz">
+ <label for="signaturetype"><fmt:message key="signupload.signaturetype"/>:</label>
+ </div>
+ <div class="linksauswahllang">
+ <select id="signaturetype" name="<%= FormFields.FIELD_SIGNATURE_TYPE %>" autocomplete="off">
+ <% if (sign_type!=null) {
+ if (sign_type.equals(FormFields.VALUE_SIGNATURE_TYPE_DE) || sign_type.equals(FormFields.VALUE_SIGNATURE_TYPE_DE+"_NOTE")) { %>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_DE %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_DE %>" selected="selected"><fmt:message key="signupload.signaturetype.signaturblock.de"/></option>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_EN %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_EN %>"><fmt:message key="signupload.signaturetype.signaturblock.en"/></option>
+ <% } else { %>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_DE %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_DE %>"><fmt:message key="signupload.signaturetype.signaturblock.de"/></option>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_EN %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_EN %>" selected="selected"><fmt:message key="signupload.signaturetype.signaturblock.en"/></option>
+ <% }
+ } else {
+ if (german) { %>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_DE %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_DE %>" selected="selected"><fmt:message key="signupload.signaturetype.signaturblock.de"/></option>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_EN %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_EN %>"><fmt:message key="signupload.signaturetype.signaturblock.en"/></option>
+ <% } else { %>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_DE %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_DE %>"><fmt:message key="signupload.signaturetype.signaturblock.de"/></option>
+ <option name="<%= FormFields.FIELD_SIGNATURE_TYPE_EN %>" value="<%= FormFields.VALUE_SIGNATURE_TYPE_EN %>" selected="selected"><fmt:message key="signupload.signaturetype.signaturblock.en"/></option>
+ <% }
+ } %>
+ </select>
+ </div> -->
+ <!-- <div class="linkslabellang">
+ <% if (german) { %>
+ <label for="pdfa">
+ <div id="pdfalink" style="display:block"><a href="#" class="glossarbegriff" onclick='this.href="javascript:lightboxShow(\"pdfade\")"'>PDF/A-1b</a> verwenden<sup>(?)</sup>:</div>
+ <div id="pdfalinkdeaktiviert" style="display:none">PDF/A-1b verwenden<sup>(?)</sup>:</div>
+ </label>
+ <% } else { %>
+ <label for="pdfa">
+ <div id="pdfalink" style="display:block">Use <a href="#" class="glossarbegriff" onclick='this.href="javascript:lightboxShow(\"pdfaen\")"'>PDF/A-1b</a><sup>(?)</sup>:</div>
+ <div id="pdfalinkdeaktiviert" style="display:none">Use PDF/A-1b<sup>(?)</sup>:</div>
+ </label>
+ <% } %>
+ </div> -->
+ <!-- <div class="linksauswahlkurz">
+ <% if ((sign_pdfa!=null) && (sign_pdfa.equals("on"))) { %>
+ <% if (german) { %>
+ <input id="pdfa" type="checkbox" name="<%= FormFields.FIELD_PDFA_ENABLED %>" onclick="showAdvice()" checked="checked" autocomplete="off"/>
+ <%} else {%>
+ <input id="pdfa" type="checkbox" name="<%= FormFields.FIELD_PDFA_ENABLED %>" onclick="showAdvice()" checked="checked" autocomplete="off"/>
+ <% } %>
+ <% } if ((sign_pdfa==null) || (sign_pdfa.equals("off"))) { %>
+ <% if (german) { %>
+ <input id="pdfa" type="checkbox" name="<%= FormFields.FIELD_PDFA_ENABLED %>" onclick="showAdvice()" autocomplete="off"/>
+ <%} else {%>
+ <input id="pdfa" type="checkbox" name="<%= FormFields.FIELD_PDFA_ENABLED %>" onclick="showAdvice()" autocomplete="off"/>
+ <% } %>
+ <% } %>
+ </div> -->
+ <!-- <div class="linkslabellang">
+ <% if (german) { %>
+ <label for="note">
+ <div id="notelink" style="display:block"><a href="#" class="glossarbegriff" onclick='this.href="javascript:lightboxShow(\"notede\")"'>Rechtlicher Hinweis im Signaturblock </a><sup>(?)</sup>:</div>
+ <div id="notelinkdeaktiviert" style="display:none">Rechtlicher Hinweis im Signaturblock </a><sup>(?)</sup>:</div>
+ </label>
+ <% } else { %>
+ <label for="note">
+ <div id="notelink" style="display:block"><a href="#" class="glossarbegriff" onclick='this.href="javascript:lightboxShow(\"noteen\")"'>Legal note within the signature block </a><sup>(?)</sup>:</div>
+ <div id="notelinkdeaktiviert" style="display:none">Legal note within the signature block </a><sup>(?)</sup>:</div>
+ </label>
+ <% } %>
+ </div> -->
+ <!-- <div class="linksauswahlkurz">
+ <% if (((sign_note!=null) && (sign_note.equals("on"))) || (sign_note==null)) { %>
+ <% if (german) { %>
+ <input id="note" type="checkbox" name="<%= FormFields.FIELD_NOTE_ENABLED %>" checked="checked" autocomplete="off"/>
<% } else { %>
- <select name="<%= FormFields.FIELD_MODE %>" onchange="return updateForm();">
- <option value="<%= FormFields.VALUE_MODE_BINARY %>" <%= FormFields.VALUE_MODE_BINARY.equals(mode) ? "selected=\"selected\"" : "" %>><fmt:message key="common.binary"/></option>
- <option value="<%= FormFields.VALUE_MODE_TEXTUAL %>" <%= FormFields.VALUE_MODE_TEXTUAL.equals(mode) ? "selected=\"selected\"" : "" %>><fmt:message key="common.textual"/></option>
- <!--
- <option value="<%= FormFields.VALUE_MODE_DETACHED %>">detached</option>
- -->
- </select>
+ <input id="note" type="checkbox" name="<%= FormFields.FIELD_NOTE_ENABLED %>" checked="checked" autocomplete="off"/>
<% } %>
- </td>
- </tr>
- <tr>
- <td align="left" nowrap="nowrap"><label><fmt:message key="signupload.signaturedevice"/>:</label></td>
- <td align="left">
- <select name="<%= FormFields.FIELD_CONNECTOR %>" onchange="return updateForm();">
- <option value="<%= Constants.SIGNATURE_DEVICE_BKU %>" <%= Constants.SIGNATURE_DEVICE_BKU.equals(device) ? "selected=\"selected\"" : "" %>><fmt:message key="common.bku"/></option>
- <option value="<%= Constants.SIGNATURE_DEVICE_MOC %>" <%= Constants.SIGNATURE_DEVICE_MOC.equals(device) ? "selected=\"selected\"" : "" %>><fmt:message key="common.mocca"/></option>
- </select>
- </td>
- </tr>
- <!--
- <tr>
- <td align="left" nowrap="nowrap"><label><fmt:message key="signupload.file"/>:</label></td>
- <td align="left"><input size="50" type="file" id="fileupload" name="<%= FormFields.FIELD_UPLOAD %>" accept="application/pdf"/></td>
- </tr>
- -->
- <tr>
- <td align="left" nowrap="nowrap" style="vertical-align: top;">
- <select name="<%= FormFields.FIELD_SOURCE %>" onchange="return updateForm();">
- <option value="<%= FormFields.VALUE_SOURCE_FILE %>" <%= FormFields.VALUE_SOURCE_FILE.equals(source) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.file"/></option>
- <option value="<%= FormFields.VALUE_SOURCE_FREETEXT %>" <%= FormFields.VALUE_SOURCE_FREETEXT.equals(source) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.freetext"/></option>
- </select>
- </td>
- <td align="left">
- <% if (freeText) { %>
- <textarea class="freetext" id="freetext" name="<%= FormFields.FIELD_FREETEXT %>"><%= StringEscapeUtils.escapeHtml(freeTextValue) %></textarea>
+ <% } else { %>
+ <%if (german) { %>
+ <input id="note" type="checkbox" name="<%= FormFields.FIELD_NOTE_ENABLED %>" autocomplete="off"/>
<% } else { %>
- <input size="50" type="file" id="fileupload" name="<%= FormFields.FIELD_UPLOAD %>" accept="application/pdf"/>
- <% } // end if freetext %>
- </td>
- </tr>
- </table>
- <% if ((!freeText && (FormFields.VALUE_MODE_TEXTUAL.equals(mode))) || pdfa) { %>
- <div class="pdfasnote"><span class="pdfasemphasis">
- <fmt:message key="signupload.note.prefix"/>:</span>
- <% if ((FormFields.VALUE_MODE_TEXTUAL.equals(mode))) { %>
- <% if (!freeText) { %><fmt:message key="signupload.note.file"/><% } %> <fmt:message key="signupload.note"/>
- <% } // end if %>
- <% if (pdfa) { %> <fmt:message key="signupload.note.pdfa"/><% } %>
+ <input id="note" type="checkbox" name="<%= FormFields.FIELD_NOTE_ENABLED %>" autocomplete="off"/>
+ <% } %>
+ <% } %>
+ </div> -->
+
+
+
+ <% if (source_mode!=null) { %>
+ <% if (source_mode.contains(FormFields.VALUE_SOURCE_FILE)) { %>
+ <div class="linkslabelkurz">
+ <label for="Choose source"><fmt:message key="signupload.source"/>:</label>
+ </div>
+ <div class="linksauswahllang">
+ <select id="source" name="<%= FormFields.FIELD_SOURCE %>" onchange="showTextarea();" autocomplete="off">
+ <option name="sourcefile" value="<%= FormFields.VALUE_SOURCE_FILE %>" selected="selected"> <fmt:message key="signupload.file"/></option>
+ <option name="sourcefreetext" value="<%= FormFields.VALUE_SOURCE_FREETEXT %>"> <fmt:message key="signupload.freetext"/></option>
+ </select>
+ </div>
+ <div class="pdfasverticalspace"></div>
+ <div class="linkslabelkurz">
+ <label id="labeldocument" for="Choose document" style="display:block"><fmt:message key="signupload.choose.document"/> <b>*</b>:</label>
+ <label id="labeltext" for="Enter text" style="display:none"><fmt:message key="signupload.choose.text"/> <b>*</b>:</label>
+ </div>
+ <div class="linkssourcefield">
+ <textarea class="freetext" id="freetext" name="<%= FormFields.FIELD_SOURCE_FREETEXT %>" autocomplete="off" align="right" style="display:none"></textarea>
+ <input size="20" type="file" id="fileupload" name="<%= FormFields.FIELD_SOURCE_FILE %>" accept="application/pdf" autocomplete="off" align="right" style="display:block"/>
+ </div>
+ <% } else {%>
+ <div class="linkslabelkurz">
+ <label for="Choose source"><fmt:message key="signupload.source"/>:</label>
+ </div>
+ <div class="linksauswahllang">
+ <select id="source" name="<%= FormFields.FIELD_SOURCE %>" onchange="showTextarea();" autocomplete="off">
+ <option name="sourcefile" value="<%= FormFields.VALUE_SOURCE_FILE %>"> <fmt:message key="signupload.file"/></option>
+ <option name="sourcefreetext" name="<%= FormFields.VALUE_SOURCE_FREETEXT %>" selected="selected"> <fmt:message key="signupload.freetext"/></option>
+ </select>
+ </div>
+ <div class="pdfasverticalspace"></div>
+ <div class="linkslabelkurz">
+ <label id="labeldocument" for="Choose document" style="display:none"><fmt:message key="signupload.choose.document"/> <b>*</b>:</label>
+ <label id="labeltext" for="Enter text" style="display:block"><fmt:message key="signupload.choose.text"/> <b>*</b>:</label>
+ </div>
+ <div class="linkssourcefield">
+ <textarea class="freetext" id="freetext" name="<%= FormFields.FIELD_SOURCE_FREETEXT %>" autocomplete="off" align="right" style="display:block"><%= sign_freetext %></textarea>
+ <input size="20" type="file" id="fileupload" name="<%= FormFields.FIELD_SOURCE_FILE %>" accept="application/pdf" autocomplete="off" align="right" style="display:none"/>
+ </div>
+ <% } %>
+ <% } else { %>
+ <div class="linkslabelkurz">
+ <label for="Choose source"><fmt:message key="signupload.source"/>:</label>
+ </div>
+ <div class="linksauswahllang">
+ <select id="source" name="<%= FormFields.FIELD_SOURCE %>" onchange="showTextarea();" autocomplete="off">
+ <option name="sourcefile" value="<%= FormFields.VALUE_SOURCE_FILE %>" selected="selected"> <fmt:message key="signupload.file"/></option>
+ <option name="sourcefreetext" value="<%= FormFields.VALUE_SOURCE_FREETEXT %>"> <fmt:message key="signupload.freetext"/></option>
+ </select>
+ </div>
+ <div class="pdfasverticalspace"></div>
+ <div class="linkslabelkurz">
+ <label id="labeldocument" for="Choose document" style="display:block"><fmt:message key="signupload.choose.document"/> <b>*</b>:</label>
+ <label id="labeltext" for="Enter text" style="display:none"><fmt:message key="signupload.choose.text"/> <b>*</b>:</label>
+ </div>
+ <div class="linkssourcefield">
+ <textarea class="freetext" id="freetext" name="<%= FormFields.FIELD_SOURCE_FREETEXT %>" autocomplete="off" align="right" style="display:none"></textarea>
+ <input size="20" type="file" id="fileupload" name="<%= FormFields.FIELD_SOURCE_FILE %>" accept="application/pdf" autocomplete="off" align="right" style="display:block"/>
+ </div>
+ <% } %>
+ <!-- <div class="pdfasverticalspace"></div>
+ <div class="linksnote">
+ <% if (((sign_pdfa!=null) && (sign_pdfa.equals("on"))) || ((sign_mode!=null) && (sign_mode.contains("textual")))) { %>
+ <% if ((sign_pdfa!=null) && (sign_pdfa.equals("on")) && ((sign_mode==null) || (!sign_mode.contains("textual")))) { %>
+ <div id="hinweispdfa" style="display:block"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfile" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/></div>
+ <div id="hinweistext" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/></div>
+ <div id="hinweistextpdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfilepdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/> <fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="space" class="pdfasverticalspace" style="display:block"></div>
+ <% } if ((sign_mode!=null) && (sign_mode.contains("textual")) && (source_mode.equals(FormFields.VALUE_SOURCE_FILE)) && ((sign_pdfa==null) || (!sign_pdfa.equals("on")))) { %>
+ <div id="hinweistextfile" style="display:block"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/></div>
+ <div id="hinweistext" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/></div>
+ <div id="hinweispdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextpdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfilepdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/> <fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="space" class="pdfasverticalspace" style="display:block"></div>
+ <% } if ((sign_mode!=null) && (sign_mode.contains("textual")) && (!source_mode.equals(FormFields.VALUE_SOURCE_FILE)) && ((sign_pdfa==null) || (!sign_pdfa.equals("on")))) { %>
+ <div id="hinweistext" style="display:block"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/></div>
+ <div id="hinweistextfile" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/></div>
+ <div id="hinweispdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextpdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfilepdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/> <fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="space" class="pdfasverticalspace" style="display:block"></div>
+ <% } if ((sign_mode!=null) && (sign_mode.contains("textual")) && (source_mode.equals(FormFields.VALUE_SOURCE_FILE)) && (sign_pdfa!=null) && (sign_pdfa.equals("on"))) { %>
+ <div id="hinweistextfilepdfa" style="display:block"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/> <fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfile" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/></div>
+ <div id="hinweistext" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/></div>
+ <div id="hinweispdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextpdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="space" class="pdfasverticalspace" style="display:block"></div>
+ <% } if ((sign_mode!=null) && (sign_mode.contains("textual")) && (!source_mode.equals(FormFields.VALUE_SOURCE_FILE)) && (sign_pdfa!=null) && (sign_pdfa.equals("on"))) { %>
+ <div id="hinweistextpdfa" style="display:block"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfile" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/></div>
+ <div id="hinweistext" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/></div>
+ <div id="hinweispdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfilepdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/> <fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="space" class="pdfasverticalspace" style="display:block"></div>
+ <% }
+ } else { %>
+ <div id="hinweistextfile" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/></div>
+ <div id="hinweistext" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/></div>
+ <div id="hinweispdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextpdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="hinweistextfilepdfa" style="display:none"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>: </span><fmt:message key="signupload.note.file"/> <fmt:message key="signupload.note"/> <fmt:message key="signupload.note.pdfa"/></div>
+ <div id="space" class="pdfasverticalspace" style="display:none"></div>
+ <% } %>
+ </div> -->
+ <!-- <div class="linkssigblock">
+ <% if (german) { %>
+ <img src="images/SIGNATURBLOCK_DE.jpg" id="Signaturblock" width="410" height="190"
+ alt="Der Signaturblock stellt den Signaturwert, den Namen und gegebenenfalls Titel des Unterzeichners,
+ das Aussteller-Zertifikat, die Seriennummer, die Signaturmethode die entweder binär oder textuell ist,
+ die Signaturparameter, welche zum Beispiel den verwendeten Hashalgorithmus beinhalten,
+ Informationen zur Signaturprüfung, einen Hinweis und schließlich das Datum und die Uhrzeit der Signatur"/>
+ <% } else { %>
+ <img src="images/SIGNATURBLOCK_EN.jpg" id="Signaturblock" width="410" height="190"
+ alt="The signature block shows the signature value, the name of the signator, the certificate of the issuer,
+ the serial number, one of the possible signature methods binary or textual, the signature parameters that
+ for example do provide informations about the hash algorithm, informations on the signature verification,
+ an advice and finally the date and time when the document is signed."/>
+ <% } %>
+ </div> -->
+ <!-- <div class="linksnotesigblock">
+ <fmt:message key="signupload.noteonsigmark"/>
+ </div>
+ <div class="pdfasverticalspace"></div>
+ <div class="linkspreview">
+ <input type="submit" name="<%= FormFields.FIELD_PREVIEW %>" value="<fmt:message key="signupload.button.preview"/>" onclick="return previewForm()"/>
+ </div> -->
+ </div>
</div>
- <% } // end if %>
-
- <input type="hidden" name="<%= FormFields.FIELD_DOWNLOAD %>" value="<%= FormFields.VALUE_DOWNLOAD_ATTACHMENT %>"/>
- <input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
-
- <div class="pdfasverticalspace"></div>
-
- <jsp:include page="SIGNATURBLOCK.jsp"/>
- <div class="pdfasnote"><fmt:message key="signupload.noteonsigmark"/></div>
- <% if (Constants.SIGNATURE_DEVICE_BKU.equals(device)) { %>
- <div>
- <!-- =============================================== Start BKU-Erkennung -->
- <iframe src="<%= request.getContextPath() %>/bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
- <!-- ================================================ Stop BKU-Erkennung -->
+ <div class="rechts" id="sign" style="display:block">
+ <div class="rechtsinhalt" id="signintern">
+ <div class="rechtslinks">
+ <img src="https://www.buergerkarte.at/test-pdf-as/images/onlineBKU.png" alt="Chip-Karte" id="Karte" />
+ </div>
+ <div class="rechtsrechts">
+ <img src="https://www.buergerkarte.at/test-pdf-as/images/mobileBKU.png" alt="Handy" id="Handy"/>
+ </div>
+ <div class="rechtslinks">
+ <input type="submit" name="<%= FormFields.FIELD_CONNECTOR_SMARTCARD %>" value="<fmt:message key="signupload.signwithcard"/>" alt="Signatur mit Karte" onclick="return submitForm(this)"></input>
+ </div>
+ <div class="rechtsrechts">
+ <input type="submit" name="<%= FormFields.FIELD_CONNECTOR_MOBILE %>" value="<fmt:message key="signupload.signwithmobile"/>" alt="Signatur mit Handy" onclick="return submitForm(this)"></input>
+ </div>
+ <!-- Here the hidden signature parameters are inserted because in the meanwhile they can
+ not more choosed by the user -->
+ <div id="hiddenfields" style="display:none">
+ <input type="hidden" name="<%=FormFields.FIELD_MODE %>" value="<%=FormFields.VALUE_MODE_BINARY %>"/>
+ <input type="hidden" name="<%=FormFields.FIELD_PDFA_ENABLED %>" value="off"/>
+ <input type="hidden" name="<%=FormFields.FIELD_NOTE_ENABLED %>" value="on"/>
+ <% if (german) { %>
+ <input type="hidden" name="<%=FormFields.FIELD_SIGNATURE_TYPE %>" value="<%=FormFields.VALUE_SIGNATURE_TYPE_DE %>"/>
+ <% } else { %>
+ <input type="hidden" name="<%=FormFields.FIELD_SIGNATURE_TYPE %>" value="<%=FormFields.VALUE_SIGNATURE_TYPE_EN %>"/>
+ <% } %>
+ <input type="hidden" name="<%=FormFields.FIELD_HEIGHT_SIGNDIV %>" value=""/>
+ </div>
</div>
- <% } else if (Constants.SIGNATURE_DEVICE_MOC.equals(device)) { %>
- <div>
- <img src="images/chiperling.jpg" width="57" height="57" alt="<fmt:message key="common.mocca"/>"/>
+ </div>
+ <!-- The IFrame and Local BKU button -->
+ <div class="rechts" id="signiframe" style="display:none">
+ <div class="rechtsinhalt" id="signiframeintern">
+ <div style="background:#e6f2fa"><iframe id="iframe" src="https://www.buergerkarte.at/test-pdf-as/jsp/please_wait.jsp" name="iframe" width="190px" height="190px" scrolling="no" title="iframe" frameborder="0">
+ </iframe></div>
+ <div class="pdfassmallverticalspace"></div>
+ <div id="localbku" style="display:none; border-top:1px solid black; text-align:left; padding:3px">
+ <input type="submit" name="<%= FormFields.FIELD_CONNECTOR_LOCALBKU %>" value="<fmt:message key="common.bku"/>" alt="Signatur mit lokaler BKU" onclick="return submitForm(this)"/>
+ <div style="font-size:75%"><fmt:message key="nullrequestpage.localbku.advice"/></div>
+ <div class="pdfassmallverticalspace"></div>
+ </div>
+ <div id="backlink" align="left"><a href="<%= request.getContextPath() %>/" target="_parent"><fmt:message key="common.cancel"/></a></div>
</div>
- <% } else { %>
- <div class="pdfasverticalspace"></div>
- <% } // end if %>
- <div>
- <input type="submit" value="<fmt:message key="signupload.button.sign"/>" onclick="return submitForm(false);"/>
- <input type="submit" value="<fmt:message key="signupload.button.preview"/>" onclick="return submitForm(true);"/>
+ </div>
+ <!-- Fake signature buttons for the case an error occured and this error has to be displayed
+ within the above IFrame. In this case the real signature buttons are deleted with javascript
+ and this buttons are showed -->
+ <div class="rechts" id="downloadsignbuttons" style="display:none">
+ <div class="rechtsinhalt" id="downloadsignbuttonsintern">
+ <div class="rechtslinks">
+ <img src="https://www.buergerkarte.at/test-pdf-as/images/onlineBKU.png" alt="Chip-Karte" id="Karte"/>
+ </div>
+ <div class="rechtsrechts">
+ <img src="https://www.buergerkarte.at/test-pdf-as/images/mobileBKU.png" alt="Handy" id="Handy"/>
+ </div>
+ <div class="rechtslinks">
+ <input type="submit" name="<%= FormFields.FIELD_CONNECTOR_SMARTCARD %>" value="<fmt:message key="signupload.signwithcard"/>" alt="Signatur mit Karte" onclick="return submitForm(this)" disabled="disabled"></input>
+ </div>
+ <div class="rechtsrechts">
+ <input type="submit" name="<%= FormFields.FIELD_CONNECTOR_MOBILE %>" value="<fmt:message key="signupload.signwithmobile"/>" alt="Signatur mit Handy" onclick="return submitForm(this)" disabled="disabled"></input>
+ </div>
</div>
+ </div>
+ </form>
+ </div>
-</form>
-
+ <!-- Form that sets the source choosed and eventually the text when free text is choosen.
+ This is for passing the information when the change language link was hit. -->
+ <form name="changelanguage" id="changelanguage" method="post" accept-charset="UTF-8" action="https://www.buergerkarte.at/test-pdf-as/jsp/signupload.jsp" target="_self">
+ <% if (german) { %>
+ <input type="hidden" name="newlanguage" value="de"/>
+ <% } else { %>
+ <input type="hidden" name="newlanguage" value="en"/>
+ <% } %>
+ <% if (source_mode!=null) {
+ if (source_mode.contains(FormFields.VALUE_SOURCE_FILE)) { %>
+ <input type="hidden" name="source_mode" value="file"/>
+ <input type="hidden" name="text" value=""/>
+ <% } else { %>
+ <input type="hidden" name="source_mode" value="text"/>
+ <input type="hidden" name="text" value="<%= sign_freetext %>"/>
+ <% }
+ } else { %>
+ <input type="hidden" name="source_mode" value="file"/>
+ <input type="hidden" name="text" value=""/>
+ <% } %>
+ </form>
+
+ <script language="javascript" type="text/javascript">
+ initFileUploads();
+ checkHeight();
+ detectBrowser();
+ </script>
+
+ <%
+ //After loading the page set all attributes to null
+ session.setAttribute(SignServlet.SUBMITFORM_SIGNATURE_MODE_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_SOURCE_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_SIGNATURE_TYPE_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_PDFA_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_NOTE_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_FREETEXT_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_SIGNATURE_DEVICE_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_FILE_KEY, null);
+ session.setAttribute(SignServlet.SUBMITFORM_FILENAME_KEY, null);
+ session.setAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION, null);
+ session.setAttribute(SignServlet.ERROR_WITHIN_IFRAME, null);
+
+ %>
</body>
</html>