Dictionary/webroot/jsp/passageForm.jsf

75 lines
3 KiB
Text
Raw Normal View History

<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!--passageForm.jsf-->
<c:out value='<a name="${ component }" ></a>' escapeXml="false" />
<c:choose>
<c:when test="${ ! empty param.formMode && param.formMode == 'insert'}">
<c:set var="updateMode" value="${ false }" />
<c:set var="newCmd" value="insert" />
<c:set var="literarySource" value="1" />
<c:set var="spelling" value="" />
<c:set var="pagination" value="" />
<c:set var="passage" value="" />
<c:set var="metaId" value="" />
</c:when>
<c:when test="${ ! empty param.formMode && param.formMode == 'update'}">
<c:set var="updateMode" value="${ true }" />
<c:set var="newCmd" value="update" />
<c:set var="literarySource" value="${ component.literarySource }" />
<c:set var="spelling" value="${ component.spelling }" />
<c:set var="pagination" value="${ component.pagination }" />
<c:set var="passage" value="${ component.passage }" />
<c:set var="metaId" value="${ component.metaId }" />
</c:when>
<c:otherwise>
<c:set var="updateMode" value="${ false }" />
<c:set var="newCmd" value="" />
<c:set var="literarySource" value="ERROR" />
<c:set var="spelling" value="ERROR" />
<c:set var="pagination" value="ERROR" />
<c:set var="passage" value="ERROR" />
</c:otherwise>
</c:choose>
<c:set var="translateMode" value="${ false }" />
<c:if test="${ component.translationOf > 0 }">
<c:set var="translateMode" value="${ true }" />
<c:set var="originalPagination" value="Original Pagination: ${ original.pagination } <br /> Translation " />
<c:set var="originalPassage" value="Original Passage: ${ original.passage } <br /> Translation " />
<%-- <c:set var="pagination" value="" />
<c:set var="passage" value="" /> --%>
</c:if>
<form id="newCompForm" action="/lex/action" method="post">
<p>
<c:if test="${ translateMode }">
<c:out value='<input type="hidden" name="translationOf" value="${ component.translationOf }" />' escapeXml="false" />
</c:if>
<input type="hidden" name="comp" value="passage" />
<c:if test="${ updateMode }">
<c:out value='<input type="hidden" name="metaId" value="${metaId}" />' escapeXml="false" />
</c:if>
<c:out value='<input type="hidden" name="cmd" value="${newCmd}" />' escapeXml='false' />
LiterarySource: <c:out value='<input type="text" value="${ literarySource }" name="literarySource" size="50" />' escapeXml='false' /> <br />
Spelling: <c:out value='<input type="text" value="${ spelling }" name="spelling" size="50" />' escapeXml='false' /> <br />
<c:out value="${ originalPagination } " escapeXml='false' />
Pagination: <br />
<c:out value='<input type="text" name="pagination" cols="90" value="${ pagination }"/>' escapeXml="false"/><br />
<c:out value="${ originalPassage }" escapeXml='false' />
Passage: <br />
<textarea name="passage" rows="8" cols="90"><c:out value='${ passage }' /></textarea> <br />
<jsp:include page="metaForm.jsf" />
<input type="submit" value="Submit Passage" />
</p>
</form>