<%@ include file="/includes.jsp"%>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
    <br/>
    <br/>
    <smvc:form action="nrlDepartmentEdit.form" modelAttribute="nrlDepartment"  method="post" id="nrlDepartmentEdit" >
    <input type="hidden" name="redirectParams" value="<c:out value="${requestScope['javax.servlet.forward.query_string']}" />" />
        <table>
            <tr>
                <td class="error"><smvc:errors></smvc:errors></td>                
            </tr>
            <spring:bind path="departmentName">                
                 <c:if test="${status.error}"> 
                        <tr>
                            <td class="error">Please specify a department name.</td>                
                        </tr>
                 </c:if>
              </spring:bind>
            <spring:bind path="description">               
                 <c:if test="${status.error}"> 
                        <tr>
                            <td class="error">Please specify description.</td>                
                        </tr>
                 </c:if>
              </spring:bind>
        </table>
        
        <c:if test="${nrlDepartamentSaved != NULL}">                      
            <table border="0" align="center" class="message" >
                  <tr>
                    <td colspan="2"><c:out value="${nrlDepartamentSaved}"/></td>
                  </tr>  
            </table>
        </c:if>
        <br/>
        <fieldset style="width: 520px" class="nobg">
            <legend><c:if test="${requestScope.NEW ne 'NEW'}">Edit</c:if> NRL Department</legend>
            <fieldset>
                <table>
                    <tr>
                        <td colspan="9"><B><c:if test="${requestScope.NEW ne 'NEW'}">Edit</c:if> NRL Department</B></td>
                    </tr>
                      <tr>
                        <td colspan="9">&#160;</td>
                    </tr>
                </table>
                <table width="100%" border = "1" bordercolor="#F8F8FF">
                    <tr>
                        <td width="10%"><B> Name<span class="mandatory">*</span> :</B></td>
                        <td width="10%"><smvc:input path="departmentName" maxlength="25" size="20" /></td>
                    </tr>
                     <tr>
                        <td width="10%"><B> Description<span class="mandatory">*</span> :</B></td>
                        <td width="10%"><smvc:input path="description" maxlength="50" size="20" /></td>
                    </tr>
                </table>
            </fieldset>
            <fieldset class="buttonFieldset">
                <table width="100%">
                    <tr>
                        <td align="left">
                            <input type="button" value="Back To NRL Departments" onclick="location.href='nrlDepartments.form'" />
                        </td>
                        <td align="right">
                            <input type="submit" value="Save" onclick="showPleaseWait();" />
                        </td>
                    </tr>
                </table>
            </fieldset>
        </fieldset>        
   

                
    </smvc:form>
</jsp:root>