<%@page import="at.gv.egiz.pdfas.web.FormFields"%> <%@page import="at.gv.egiz.pdfas.web.session.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="org.apache.commons.lang.BooleanUtils"%> <%@ page import="at.gv.egiz.pdfas.web.i18n.LocaleParamFilter" %> <%@ page import="java.util.Locale" %> <%@ page import="at.gv.egiz.pdfas.web.servlets.SignServlet" %> <%@ page import="at.gv.egiz.pdfas.web.helper.LocalRequestHelper" %> <%@ include file="/jsp/language.jsp" %> <% //Get the previous settings if user hitted back or back link //Many of this settings do not apply anymore String sign_mode=null; String source_mode=null; String sign_type=null; String sign_pdfa=null; String sign_note=null; String sign_freetext=null; String sessionLang = null; sessionLang = (String)session.getAttribute(SessionAttributes.LANGUAGE); sign_mode = (String)session.getAttribute(SignServlet.SUBMITFORM_SIGNATURE_MODE_KEY); source_mode = (String)session.getAttribute(SignServlet.SUBMITFORM_SOURCE_KEY); sign_type = (String)session.getAttribute(SignServlet.SUBMITFORM_SIGNATURE_TYPE_KEY); sign_pdfa = (String)session.getAttribute(SignServlet.SUBMITFORM_PDFA_KEY); sign_note = (String)session.getAttribute(SignServlet.SUBMITFORM_NOTE_KEY); sign_freetext = (String)session.getAttribute(SignServlet.SUBMITFORM_FREETEXT_KEY); session.removeAttribute(SessionAttributes.DOWNLOAD_URL_FOR_SIGNED_PDF_DOCUMENT); session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); String serverUrl=LocalRequestHelper.getLocalServerAddress(request,response); String baseUrl=LocalRequestHelper.getLocalContextAddress(request,response); //Check if application is started within an iframe from an extern application String extern = (String)request.getParameter("extern"); boolean startedFromIFrame = false; if (extern !=null) { if (extern.equals("yes")) { startedFromIFrame = true; } } //When Change Language link is hit, three parameters are passed with a hidden form //so that the settings keep the same. Check if this parameters are passed... String source_mode_request = (String)request.getParameter("source_mode"); String text_request = (String)request.getParameter("text"); String lang_request = (String)request.getParameter("newlanguage"); if (lang_request!=null) { if (source_mode_request.equals("file")) { session.setAttribute(SignServlet.SUBMITFORM_SOURCE_KEY, FormFields.VALUE_SOURCE_FILE); } else { session.setAttribute(SignServlet.SUBMITFORM_SOURCE_KEY, FormFields.VALUE_SOURCE_FREETEXT); session.setAttribute(SignServlet.SUBMITFORM_FREETEXT_KEY, text_request); } if (lang_request.equals("de")) { session.setAttribute(SessionAttributes.LANGUAGE, "de"); } else { session.setAttribute(SessionAttributes.LANGUAGE, "en"); } } boolean testMode = request.getContextPath().startsWith("/test-"); //boolean forceTextualForMocca = false; String requestLang = (String)request.getParameter("locale"); sessionLang = (String)session.getAttribute(SessionAttributes.LANGUAGE); String language = ""; //If language within session... if (sessionLang!=null) { //But if language also changed by clicking the change language link //or passed as parameter with the URL... if (requestLang!=null) { //If language has changed, change it also within session if (!sessionLang.equals(requestLang)) { session.setAttribute(SessionAttributes.LANGUAGE, requestLang); } //else do nothing } //else no change } //Else still no language within session else { //But if language changed by clicking the change language link //or passed as parameter with the URL... if (requestLang!=null) { if (requestLang.equals("de")) { session.setAttribute(SessionAttributes.LANGUAGE,"de"); } else { session.setAttribute(SessionAttributes.LANGUAGE,"en"); } } //No language here. Set to german else { session.setAttribute(SessionAttributes.LANGUAGE,"de"); } } language = (String)session.getAttribute(SessionAttributes.LANGUAGE); boolean german=true; if (language!=null) { if (language.equals("en")) { german = false; } } if (sign_freetext==null) { sign_freetext = ""; } if (german) { %> <% } else { %> <% } %> <% if (testMode) { %> <fmt:message key="test.common.title"/> <% } else { %> <fmt:message key="common.title"/> <% } // end if %> <% //If application called within an IFrame from an external application //choose template and set session attribute if (!startedFromIFrame) { session.setAttribute("extern", "no"); if (german) { %> <% } else { %> <% } } else { session.setAttribute("extern", "yes"); %> <% } %> <% if (!startedFromIFrame) { %>

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

<% } %> <% if (source_mode!=null) { if (source_mode.contains(FormFields.VALUE_SOURCE_FILE)) { %>
<% } else { %>
<% } } else { %>
<% } %>
Handy
" alt="Signatur mit Handy" onclick="return submitForm(this)">
<% if (german) { %> <% } else { %> <% } %> <% if (source_mode!=null) { if (source_mode.contains(FormFields.VALUE_SOURCE_FILE)) { %> <% } else { %> <% } } else { %> <% } %>