aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/webapp/jsp/signpreview.jsp
diff options
context:
space:
mode:
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>