YACOSTest: Correction du à l'ajout de abstractText dans article

YACOSWeb: Modification d'un article qui marche (réenvoie d'un fichier ou pas)
This commit is contained in:
Frederic Debuire
2008-02-16 22:32:30 +00:00
parent 4929caa9ce
commit fe73c608a3
5 changed files with 285 additions and 233 deletions

View File

@@ -1,75 +1,79 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head>
<script type='text/javascript' src='./javascripts/prototype.js'></script>
<script type='text/javascript' src='./javascripts/scriptaculous.js'></script>
<script type='text/javascript' src='./javascripts/effects.js'></script>
<script type='text/javascript' src='./javascripts/yacos/submissionArticle.js'></script>
</head>
<body>
<h4 class="title">
<c:choose>
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head>
<script type='text/javascript' src='./javascripts/prototype.js'></script>
<script type='text/javascript' src='./javascripts/scriptaculous.js'></script>
<script type='text/javascript' src='./javascripts/effects.js'></script>
<script type='text/javascript'
src='./javascripts/yacos/submissionArticle.js'></script>
</head>
<body>
<h4 class="title"><c:choose>
<c:when test="${param['action'] eq 'modify'}">
<fmt:message key="submission.modify" />
</c:when>
<c:otherwise>
<fmt:message key="submission.title" />
</c:otherwise>
</c:choose>
</h4>
<form:form method="post" enctype="multipart/form-data" commandName="submissionArticle">
<fieldset>
<form:label path="title"><fmt:message key="form.submission.article.title" /></form:label> <form:input path="title"/> <span class="formError"><form:errors path="title"/></span> <br/><br />
<form:label path="theme"><fmt:message key="form.submission.article.theme" /></form:label> <form:input path="theme"/> <span class="formError"><form:errors path="theme"/></span><br/><br />
<form:label path="abstractText"><fmt:message key="form.submission.article.abstractText" /></form:label> <form:textarea path="abstractText" /><span class="formError"><form:errors path="abstractText"/></span><br/><br/>
<hr/> <br/>
</fieldset>
<fieldset>
<label for="listauthor"><fmt:message key="form.submission.listauthor" /></label> <br /><br />
<form:label path="mainauthor"><fmt:message key="form.submission.mainauthor" /></form:label>: <b>${currentUser.firstName} ${currentUser.lastName}</b>
<br/> <br/>
<label for="newSecondaryAuthor"><fmt:message key="form.submission.secondaryauthor" /></label>
<input id="newSecondaryAuthorInput" type="text" name="newSecondaryAuthor" />
<input type="button" id="addSecondaryButton" name="addSecondary" value="<fmt:message key="button.add" />">
<div id="secondaryAuthorList" class="dynamicList">
<div class="dynamicListHeader">
<fmt:message key="form.submission.secondaryauthor" />
</div>
<c:if test="${param['action'] eq 'modify'}">
<c:forEach items="${listSecondaryAuthors}" var="secAuthor" varStatus="i">
<div class="dynamicListItem" style="height: 0px; width: 0px;" id="liste[${i.index}]">${secAuthor}<input type="hidden" id="liste[${i.index}]" name="liste[${i.index}]" value="${secAuthor}"/></div>
</c:forEach>
</c:if>
</div>
<input type="button" id="removeSecondaryButton" name="removeSecondary" value="<fmt:message key="button.removeSelected" />"/>
<br /><br />
</fieldset>
<hr />
<fieldset>
<br />
<div class="formError"><form:errors path="file"/></div>
File <input type="file" name="file"/>
<br /><br />
<input type="reset" value="<fmt:message key="button.reset" />"/>
<input type="submit" value="<fmt:message key="button.OK" />"/> <br/><br/>
</fieldset>
</c:choose></h4>
<form:form method="post" enctype="multipart/form-data" commandName="submissionArticle">
<table>
<tbody>
<tr>
<td class="formLabel"><fmt:message key="form.submission.article.title" /></td>
<td><form:input path="title" /> <span class="formError"><form:errors path="title" /></span></td>
</tr>
<tr>
<td class="formLabel"><fmt:message key="form.submission.article.theme" /></td>
<td><form:input path="theme" /> <span class="formError"><form:errors path="theme" /></span></td>
</tr>
<tr>
<td class="formLabel"><fmt:message key="form.submission.article.abstractText" /></td>
<td><form:textarea path="abstractText" cols="60" rows="10" /><span class="formError"><form:errors path="abstractText" /></span></td>
</tr>
<tr>
<td class="formLabel"><fmt:message key="form.submission.mainauthor" />:</td>
<td><b>${currentUser.firstName} ${currentUser.lastName}</b></td>
</tr>
<tr>
<td class="formLabel"><fmt:message key="form.submission.secondaryauthor" /></td>
<td><input id="newSecondaryAuthorInput" type="text" name="newSecondaryAuthor" />
<input type="button" id="addSecondaryButton" name="addSecondary" value="<fmt:message key="button.add" />">
<div id="secondaryAuthorList" class="dynamicList">
<div class="dynamicListHeader"><fmt:message key="form.submission.secondaryauthor" /></div>
<c:if test="${param['action'] eq 'modify'}">
<c:forEach items="${listSecondaryAuthors}" var="secAuthor" varStatus="i">
<div class="dynamicListItem" style="height: 0px; width: 0px;"
id="liste[${i.index}]">${secAuthor}<input type="hidden"
id="liste[${i.index}]" name="liste[${i.index}]"
value="${secAuthor}" /></div>
</c:forEach>
</c:if>
</div>
<input type="button" id="removeSecondaryButton" name="removeSecondary" value="<fmt:message key="button.removeSelected" />" /></td>
</tr>
<tr>
<td class="formLabel">File</td>
<td><input type="file" name="file" /><div class="formError"><form:errors path="file" /></div></td>
</tr>
</tbody>
<tfoot>
<tr>
<td>&nbsp;</td>
<td><input type="reset" value="<fmt:message key="button.reset" />" />
<input type="submit" value="<fmt:message key="button.OK" />" /></td>
</tr>
</tfoot>
</table>
</form:form>
<a href="<c:url value="main.htm"/>">Home</a>
</body>
</html>
<a href="<c:url value="main.htm"/>">Home</a>
</body>
</html>