From 95f6c6fe321d33dc8fa9e18c7d96bd9b21ef10cc Mon Sep 17 00:00:00 2001 From: tknall Date: Wed, 14 Jan 2009 11:39:31 +0000 Subject: Switching to itext-2.1.5-rev3628. itext library: minor adjustments for pdf-as Adding new error code (103) for invalid pdfa/1b font configuration. Minor updates for PDF/A support. Support for local MOCCA CCS added. Multi language for web application. Encoding issue for web application fixed by implementing an EncodingFilter. Dynamic sign upload form implemented. Order of input fields for dynamic upload form changed. MOCCA logo added to sign upload form. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@319 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/webapp/jsp/signupload.jsp | 174 +++++++++++++++++++++++++++++-------- 1 file changed, 138 insertions(+), 36 deletions(-) (limited to 'src/main/webapp/jsp/signupload.jsp') diff --git a/src/main/webapp/jsp/signupload.jsp b/src/main/webapp/jsp/signupload.jsp index 3db3be5..287afb1 100644 --- a/src/main/webapp/jsp/signupload.jsp +++ b/src/main/webapp/jsp/signupload.jsp @@ -1,78 +1,180 @@ <%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %> <%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %> <%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %> +<%@ page import="at.gv.egiz.pdfas.web.i18n.LanguageDecoratorMapper"%> +<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.UpdateFormServlet"%> + +<%@ include file="language.jsp" %> + - PDF-Signaturen + <% + boolean testMode = request.getContextPath().startsWith("/test-"); + boolean forceTextualForMocca = true; + %> + + <% + if (testMode) { + %> + <fmt:message key="test.common.title"/> + <% } else { %> + <fmt:message key="common.title"/> + <% } // end if %> + <% session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); %> + + <% + 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); + } + 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_TEXTUAL; + session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY, mode); + } + 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()) ? "SIGNATURBLOCK_DE" : "SIGNATURBLOCK_EN"; + session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY, type); + } + + %> -

PDF-Signaturen

-

Dokument Signatur erstellen

-
Bitte wählen Sie die zu signierende PDF-Datei. Diese wird mit Ihrer Bürgerkarte signiert.
-
+ <% + if (testMode) { + %> + + <% } else { %> + + <% } // end if %> + +

+
+ + + + + +
- - - - - + - + - + + + + +
- + +
- + <% if (forceTextualForMocca && Constants.SIGNATURE_DEVICE_MOC.equals(device)) {%> + + + <% } else { %> + + <% } %>
- + +
-
Bitte beachten Sie: Im textuellen Modus signierte Dokumente können nur dann geprüft werden, wenn das Zertifikat in einem Verzeichnisdienst verfügbar ist.
+
:
- + -
Das Erscheinungsbild der Signaturmarke kann abhängig vom Signatur Typ, vom Signatur Modus, von der verwendeten Bürgerkarte, sowie von der verwendeten Bürgerkartenumgebung variieren.
-
- - - -
- - +
+ <% if (Constants.SIGNATURE_DEVICE_BKU.equals(device)) { %> +
+ + + +
+ <% } else if (Constants.SIGNATURE_DEVICE_MOC.equals(device)) { %> +
+ <fmt:message key="/> +
+ <% } else { %> +
+ <% } // end if %> +
+ " onclick="return submitForm(false);"/> + " onclick="return submitForm(true);"/> +
- \ No newline at end of file + -- cgit v1.2.3