]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/WebContent/study/importDocument.jsp
Salome HOME
Validation of the screens' input fields are implemented.
[tools/siman.git] / Workspace / Siman / WebContent / study / importDocument.jsp
index 8c7d22aa4303913358e69961f4d69d9974637653..899b182f8cc16bbfb66ba051ac39a4644170de44 100644 (file)
@@ -30,6 +30,17 @@ $(document).ready(function () {
                  $("#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>
 
@@ -53,19 +64,19 @@ $(document).ready(function () {
        </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" />&nbsp;&nbsp;</td>
-               <td align="left">&nbsp;<s:text name="field.documentitle" /></td>
+               <td align="left">&nbsp;<s:text name="field.documentitle" />&nbsp;<span class="error">*</span></td>
        </tr>
        <tr>
                <td><s:select theme="simple" name="documentType"
@@ -97,7 +108,6 @@ $(document).ready(function () {
                        name="documentState" list="documentStates" listKey="value"
                        listValue="%{getText(key)}" disabled="" /></td>
        </tr>
-</table>
-</form>
+</s:form>
 </div>
 </div>