From 125cc4075896aceda7cb02ecee84e18604294ff4 Mon Sep 17 00:00:00 2001 From: pdanner Date: Mon, 6 Dec 2010 16:53:47 +0000 Subject: Moved to pdf-as-web project git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@674 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/webapp/jsp/signupload.jsp | 296 ------------------------------------- 1 file changed, 296 deletions(-) delete mode 100644 src/main/webapp/jsp/signupload.jsp (limited to 'src/main/webapp/jsp/signupload.jsp') diff --git a/src/main/webapp/jsp/signupload.jsp b/src/main/webapp/jsp/signupload.jsp deleted file mode 100644 index 4df2fe3..0000000 --- a/src/main/webapp/jsp/signupload.jsp +++ /dev/null @@ -1,296 +0,0 @@ -<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %> -<%@ page import="at.knowcenter.wag.egov.egiz.web.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="at.knowcenter.wag.egov.egiz.web.servlets.UpdateFormServlet"%> -<%@ page import="org.apache.commons.lang.BooleanUtils"%> - - - -<%@ include file="language.jsp" %> - - - - <% - 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"; - - %> - - <% - if (testMode) { - %> - <fmt:message key="test.common.title"/> - <% } else { %> - <fmt:message key="common.title"/> - <% } // end if %> - - <% session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); %> - - <% - // 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); - - %> - - -

- <% - if (testMode) { - %> - - <% } else { %> - - <% } // end if %> -

-

- <% if (freeText) { %> - - <% } else { %> - - <% } %> -

-
- <% if (freeText) { %> - - <% } else { %> - - <% } %> -
-
- - - - - - <% if (freeText) { %> - - <% } // end if %> -
-
- - - - - - - - - - - - - - - - - - -
- - - - onclick="return updateForm();"/>  -
- <% if (forceTextualForMocca && Constants.SIGNATURE_DEVICE_MOC.equals(device)) {%> - - - <% } else { %> - - <% } %> -
- -
- - - <% if (freeText) { %> - - <% } else { %> - - <% } // end if freetext %> -
- <% if ((!freeText && (FormFields.VALUE_MODE_TEXTUAL.equals(mode))) || pdfa) { %> -
- : - <% if ((FormFields.VALUE_MODE_TEXTUAL.equals(mode))) { %> - <% if (!freeText) { %><% } %> - <% } // end if %> - <% if (pdfa) { %> <% } %> -
- <% } // end if %> - - - - -
- - - -
- <% 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);"/> -
- - - - - -- cgit v1.2.3