$("#bring #documentState option[value='inDRAFT']").hide();
}
}).change();
+
+ //hack for displaying document title error message above field labels
+ var done=false;
+ bring.addEventListener("DOMNodeInserted", function(e) {
+ if(done) {
+ done = false;
+ } else {
+ done = true;
+ $('[errorfor="documentName"]').insertAfter($('#fieldError'));
+ }
+ });
});
</script>
</tr>
</table>
-<form name="bring" id="bring" action="valid-import" method="post">
+<s:form name="bring" id="bring" action="valid-import" method="post" validate="true" cssClass="text">
<s:hidden name="fileName" /> <s:hidden name="reference" /> <s:hidden
name="documentTitle" value="%{documentName}" /> <s:hidden
name="defaultDocumentType" value="%{documentType}" /> <s:hidden
name="defaultDocumentState" value="%{documentState}" /> <s:hidden
name="version" /> <s:hidden name="documentDate" />
-<table cellpadding="0" cellspacing="0" border="0" class="text">
<tr height="15">
<td></td>
</tr>
+ <tr id="fieldError"/>
<tr>
<td align="right"><s:text name="field.documentype" /> </td>
- <td align="left"> <s:text name="field.documentitle" /></td>
+ <td align="left"> <s:text name="field.documentitle" /> <span class="error">*</span></td>
</tr>
<tr>
<td><s:select theme="simple" name="documentType"
name="documentState" list="documentStates" listKey="value"
listValue="%{getText(key)}" disabled="" /></td>
</tr>
-</table>
-</form>
+</s:form>
</div>
</div>