aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/webapp/jsp/signpreview.jsp
diff options
context:
space:
mode:
authorpdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-06 16:34:52 +0000
committerpdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-06 16:34:52 +0000
commit29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d (patch)
tree5b75b34c822a79f70b83c266465dda70b9baeaf2 /pdf-as-web/src/main/webapp/jsp/signpreview.jsp
parent04375406fc1634adbf9b37143a2125327da6a11e (diff)
downloadpdf-as-3-29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d.tar.gz
pdf-as-3-29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d.tar.bz2
pdf-as-3-29ad090c29567ff1a4d3a2ec9b8ad0b5d80ee24d.zip
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@671 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'pdf-as-web/src/main/webapp/jsp/signpreview.jsp')
-rw-r--r--pdf-as-web/src/main/webapp/jsp/signpreview.jsp84
1 files changed, 84 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/webapp/jsp/signpreview.jsp b/pdf-as-web/src/main/webapp/jsp/signpreview.jsp
new file mode 100644
index 0000000..d21a967
--- /dev/null
+++ b/pdf-as-web/src/main/webapp/jsp/signpreview.jsp
@@ -0,0 +1,84 @@
+<%@ page import="at.gv.egiz.pdfas.web.FormFields" %>
+<%@ page import="at.gv.egiz.pdfas.web.session.SessionAttributes" %>
+<%@ page import="at.gv.egiz.pdfas.web.session.SignSessionInformation" %>
+<%@ 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" %>
+
+<%@ 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"));
+ }
+%>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title><fmt:message key="signpreview.title"/></title>
+ </head>
+
+ <body>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="signpreview.heading2"/></h2>
+ <%
+ if (si.mode.equals(FormFields.VALUE_MODE_TEXTUAL)) {
+ %>
+ <form action="<%= submit_url %>" name="submitform" enctype="multipart/form-data" accept-charset="UTF-8" method="get">
+ <pre class="pdfasnt"><%= document_text != null ? document_text : "" %></pre>
+ <% if (Constants.SIGNATURE_DEVICE_BKU.equals(si.connector)) { %>
+ <div>
+ <!-- =============================================== Start BKU-Erkennung -->
+ <iframe src="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>
+ <% } else if (Constants.SIGNATURE_DEVICE_MOC.equals(si.connector)) { %>
+ <div>
+ <img src="images/chiperling.jpg" width="57" height="57" alt="<fmt:message key="common.mocca"/>"/>
+ </div>
+ <% } // end if %>
+ <input type="submit" value="<fmt:message key="signpreview.button.sign"/>" />
+ </form>
+ <%
+ } else {
+ %>
+ <div class="pdfasverticalspace"></div>
+ <form action="<%= signature_data_url %>" method="get" target="blank_">
+ <input type="submit" value="<fmt:message key="signpreview.showpreview"/>" />
+ </form>
+ <div class="pdfasverticalspace"></div>
+ <% if (Constants.SIGNATURE_DEVICE_BKU.equals(si.connector)) { %>
+ <div>
+ <!-- =============================================== Start BKU-Erkennung -->
+ <iframe src="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>
+ <% } else if (Constants.SIGNATURE_DEVICE_MOC.equals(si.connector)) { %>
+ <div>
+ <img src="images/chiperling.jpg" width="57" height="57" alt="<fmt:message key="common.mocca"/>"/>
+ </div>
+ <% } // end if %>
+ <form action="<%= submit_url %>" method="get">
+ <input type="submit" value="<fmt:message key="signpreview.button.sign"/>" />
+ </form>
+ <%
+ }
+ %>
+ <div class="pdfasverticalspace"></div>
+ <a href="<%= request.getContextPath() %>/"><fmt:message key="common.back"/></a>
+ </body>
+
+</html>