<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
    <br/>
    <smvc:form action="../nrl/nrlUsersEdit.form" modelAttribute="nrlUser"  method="post" id="nrlUserEdit">
    <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="firstname">		         
		         <c:if test="${status.error}"> 
		         		<tr>
			                <td class="error">Please specify the First Name of the user.</td>                
			            </tr>
			     </c:if>
		      </spring:bind>
	       <spring:bind path="lastname">		         
	         <c:if test="${status.error}"> 
	         		<tr>
		                <td class="error">Please specify the Last Name of the user.</td>                
		            </tr>
		     </c:if>
	      </spring:bind>
	       <spring:bind path="mnemonic">		         
	         <c:if test="${status.error}"> 
	         		<tr>
		                <td class="error">Please specify the UserName of the user.</td>                
		            </tr>
		     </c:if>
	      </spring:bind>
            <tr>
		        <td>&#160;</td>                
		    </tr>
        </table>
        
        <c:if test="${nrlUserSaved != NULL}">               	 	
	        <table border="0" align="center" class="message" >
                  <tr>
                  	<td colspan="2"><c:out value="${nrlUserSaved}"/></td>
                  </tr>  
		    </table>
		</c:if>
		<br>
        <fieldset style="width: 650px" class="nobg">
            <legend>Edit Nrl User</legend>
            <fieldset>
                <table>
                    <tr>
                        <td colspan="9"><B>Edit Nrl User</B></td>
                    </tr>
                      <tr>
                        <td colspan="9">&#160;</td>
                    </tr>
                </table>
                <table width="100%" border = "1" bordercolor="#F8F8FF" align="center">
                    <tr>
                        <td width="35%"><B>Title :</B></td>
                        <td width="70%"><smvc:input path="title" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B> First Name<span class="mandatory">*</span> :</B></td>
                        <td><smvc:input path="firstname" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B> Last Name<span class="mandatory">*</span> :</B></td>
                        <td><smvc:input path="lastname" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Telephone :</B></td>
                        <td><smvc:input path="telephone" maxlength="20" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Email:</B></td>
                        <td><smvc:input path="email" maxlength="255" size="30" /></td>
                    </tr>
                    <tr>
                        <td><B> UserName<span class="mandatory">*</span> :</B></td>
                        <td><smvc:input path="mnemonic" maxlength="50" size="30" /></td>
                    </tr>
                    <tr>
                        <td><B>Type:</B></td>
                        <td><smvc:input path="type" maxlength="50" size="30" /></td>
                    </tr>
                    <tr>
                        <td><B>Job Title:</B></td>
                        <td><smvc:input path="job_title" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Fax:</B></td>
                        <td><smvc:input path="fax" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Office Manager:</B></td>
                        <td><smvc:input path="office_mgr" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Address 1:</B></td>
                        <td><smvc:input path="address_1" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Address 2:</B></td>
                        <td><smvc:input path="address_2" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Address 3:</B></td>
                        <td><smvc:input path="address_3" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Address 4:</B></td>
                        <td><smvc:input path="address_4" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>PostCode:</B></td>
                        <td><smvc:input path="postcode" maxlength="50" size="30" /></td>
                    </tr>
                     <tr>
                        <td><B>Doctor Flag:</B></td>
                        <td><smvc:checkbox path="doctor_flag"/></td>
                    </tr>
                </table>
                    
                <table width="100%" >
                     <tr>
                         <td colspan="9">&#160;</td>
                    </tr>
                    <tr>
                         <td colspan="9">&#160;</td>
                    </tr>
                </table>
            </fieldset>
            <fieldset class="buttonFieldset">
				<table width="100%">
					<tr>
						<td align="left">
	                		<input type="button" value="Back To Nrl Users List" onclick="location.href='../nrl/nrlUsersList.form'" />
						</td>
						<td align="left">
							<c:if test="${nrlUser.id != null}">
	                			<input type="button" value="Add To Department" onclick="location.href='../nrl/nrlUsersAddDept.form?nrlUserEditId=<c:out value="${nrlUser.id}"/>'" />
							</c:if>
						</td>
						<td align="left">
							<c:if test="${nrlUser.id != null}">
	                			<input type="button" value="Create eMDT User" onclick="document.location='../admin/createUser.do?nrlUserId=<c:out value="${nrlUser.id}"/>'"/>
							</c:if>
						</td>
						<td align="right">
	                		<input type="submit" value="Save" onclick="showPleaseWait();" />
						</td>
					</tr>
				</table>
            </fieldset>
        </fieldset>        
   

                
    </smvc:form>