From 2eb9a696b20046eedbdc856a63dc11bc42763957 Mon Sep 17 00:00:00 2001 From: rpiazzi Date: Fri, 23 Sep 2011 15:10:58 +0000 Subject: Comprehensive changes due to reorganization of user interface. JavaScripts added for functionality and styling reasons. But due to changes the preview feature is no more active. See the code for further explanations. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@822 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- pdf-as-web/src/main/webapp/jsp/signpreview.jsp | 274 +++++++++++++++++++------ 1 file changed, 211 insertions(+), 63 deletions(-) (limited to 'pdf-as-web') diff --git a/pdf-as-web/src/main/webapp/jsp/signpreview.jsp b/pdf-as-web/src/main/webapp/jsp/signpreview.jsp index d21a967..a94313e 100644 --- a/pdf-as-web/src/main/webapp/jsp/signpreview.jsp +++ b/pdf-as-web/src/main/webapp/jsp/signpreview.jsp @@ -4,81 +4,229 @@ <%@ page import="at.gv.egiz.pdfas.web.io.TextDataSource"%> <%@ page import="org.apache.commons.lang.StringEscapeUtils"%> <%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %> +<%@page import="at.gv.egiz.pdfas.web.servlets.SignServlet"%> +<%@ page import="at.gv.egiz.pdfas.web.helper.LocalRequestHelper" %> + +<%@ include file="/jsp/language.jsp" %> + + -<%@ include file="language.jsp" %> -<% - SignSessionInformation si = (SignSessionInformation) session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION); - String submit_url = (String)request.getAttribute("submit_url"); - - String signature_data_url = (String)request.getAttribute("signature_data_url"); - - String document_text = null; - if (si.mode.equals(FormFields.VALUE_MODE_TEXTUAL)) { -// SignatureData data = si.si.getSignatureData(); -// TextDataSourceImpl tds = (TextDataSourceImpl)data.getDataSource(); -// document_text = StringEscapeUtils.escapeHtml(tds.getText()); - document_text = StringEscapeUtils.escapeHtml( - (String)request.getAttribute("document_text")); - } -%> - - - <fmt:message key="signpreview.title"/> + + <% + + String contextPath = LocalRequestHelper.getLocalContextAddress(request, response); + String serverUrl = LocalRequestHelper.getLocalServerAddress(request, response); + String signature_data_url = (String)request.getAttribute("signature_data_url"); + String sign_freetext = ""; + 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); + String document_text=""; + if (FormFields.FIELD_MODE_TEXTUAL.contains(sign_mode)) { + document_text = StringEscapeUtils.escapeHtml((String)request.getAttribute("document_text")); + } + + if (document_text==null) { + document_text=""; + } + + String language = (String)session.getAttribute(SessionAttributes.LANGUAGE); + + if (language!=null) { + if (language.equals("de")) {%> + + <% } else { %> + + <% } + } + else { %> + + <% } %> + + <fmt:message key="signpreview.title"/> + + + + + + + + + -

-

- <% - if (si.mode.equals(FormFields.VALUE_MODE_TEXTUAL)) { - %> -
-
<%= document_text != null ? document_text : "" %>
- <% if (Constants.SIGNATURE_DEVICE_BKU.equals(si.connector)) { %> +

+

+ +

+ + +
+ <% if (FormFields.FIELD_MODE_TEXTUAL.contains(sign_mode)) { %> +
+ <% } else { %> +
+ + <% } %> +
+
+
+ + + +