<%@ taglib uri="/tags/struts-bean-el" prefix="bean-el" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/tags/fw" prefix="fw" %>

<html-el:hidden property="registryType" />

<tr>
	<td width="45%" class="moduleLabel">
	 <c:choose>
	    <c:when test="${pageName == 'addPOWRegistry' or pageName == 'updatePOWRegistry'}">
	    	<c:set var="ssnText"><bean-el:message key="label.registry.ssn" /></c:set>
	    	<fw:label property="ssn" forId="ssnId"><bean-el:message key="label.registry.ssn" />:</fw:label>
	    </c:when>
	    <c:otherwise>
	    	<fw:label required="true" property="ssn" forId="ssnId"><bean-el:message key="label.registry.ssn" />:</fw:label>
	    	<c:set var="ssnText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.registry.ssn" /></c:set>
	    </c:otherwise>
	 </c:choose>
	</td>
	<td width="55%" class="moduleValue">	
		<input type="hidden" name="pageName" value="<c:out value="${pageName}" />" />
	   	<html-el:text title="${ssnText}" property="ssn" styleId="ssnId" styleClass="moduleEdit" size="11" maxlength="11" readOnly="${readOnlyRegistry}" onkeypress="return validateSSN(event)" onblur="formatSSN(event)"/>
	</td>
</tr>
<tr>
	<td class="moduleLabel" style="vertical-align: top; padding-top: 7"><fw:label property="militaryServiceNumber" forId="militaryServiceNumberId" ><bean-el:message key="label.registry.militaryServiceNumber" />:</fw:label></td>
	<td>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <c:choose>
		    <c:when test="${pageName == 'addPHRegistry' or pageName == 'updatePHRegistry'}"><c:set var="registryInfoForm" value="${registryPHInfoForm}" /></c:when>
		    <c:when test="${pageName == 'addPOWRegistry' or pageName == 'updatePOWRegistry'}"><c:set var="registryInfoForm" value="${registryPOWInfoForm}" /></c:when>
		    <c:when test="${pageName == 'addSHADRegistry' or pageName == 'updateSHADRegistry'}"><c:set var="registryInfoForm" value="${registrySHADInfoForm}" /></c:when>
		    <c:otherwise></c:otherwise>
		  </c:choose>
		    <c:forEach var="item" items="${registryInfoForm.militaryServiceNumbersList}" varStatus="status">		    
			<c:set var="counter" value="${status.count - 1}" />
				<c:set var="militaryServiceNumberText"><bean-el:message key="label.registry.militaryServiceNumber" /> &nbsp;<c:out value="${counter+1}" /></c:set>
			<tr><td class="moduleValue" width="20%"><html-el:text title="${militaryServiceNumberText}" styleId="militaryServiceNumberId" property="militaryServiceNumbers[${counter}]" styleClass="moduleEdit" size="22" maxlength="15" readOnly="${readOnlyRegistry}"/></td></tr>
		    </c:forEach> 
		</table>
	</td>
</tr>
<tr>
	<td class="moduleLabel"><fw:label property="prefix" forId="prefixId"><bean-el:message key="label.registry.prefix" />:</fw:label></td>
	<c:set var="prefixText"><bean-el:message key="label.registry.prefix" /> </c:set>
	<td class="moduleValue"><html-el:text title="${prefixText}" property="prefix" styleId="prefixId" styleClass="moduleEdit" size="12" maxlength="10" readOnly="${readOnlyRegistry}"/></td>
</tr>
<tr>
	<td class="moduleLabel"><fw:label required="true" property="firstName" forId="firstNameId"><bean-el:message key="label.registry.firstName" />:</fw:label></td>
	<c:set var="firstNameText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.registry.firstName" /> </c:set>
	<td class="moduleValue"><html-el:text title="${firstNameText}" property="firstName" styleId="firstNameId" styleClass="moduleEdit" size="30" maxlength="25" readOnly="${readOnlyRegistry}"/></td>
</tr>
<tr>
	<td class="moduleLabel"><fw:label property="middleName" forId="middleNameId"><bean-el:message key="label.registry.middleName" />:</fw:label></td>
	<c:set var="middleNameText"><bean-el:message key="label.registry.middleName" /> </c:set>
	<td class="moduleValue"><html-el:text title="${middleNameText}" property="middleName" styleId="middleNameId" styleClass="moduleEdit" size="30" maxlength="25" readOnly="${readOnlyRegistry}"/></td>
</tr>
<tr>
	<td class="moduleLabel"><fw:label required="true" property="lastName" forId="lastNameId"><bean-el:message key="label.registry.lastName" />:</fw:label></td>
	<c:set var="lastNameText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.registry.lastName" /> </c:set>
	<td class="moduleValue"><html-el:text title="${lastNameText}" property="lastName" styleClass="moduleEdit" styleId="lastNameId" size="30" maxlength="35" readOnly="${readOnlyRegistry}"/></td>
</tr>
<tr>
	<td class="moduleLabel"><fw:label property="suffix" forId="suffixId"><bean-el:message key="label.registry.suffix" />:</fw:label></td>
	<c:set var="suffixText"><bean-el:message key="label.registry.suffix" /> </c:set>
	<td class="moduleValue"><html-el:text title="${suffixText}" property="suffix" styleId="suffixId" styleClass="moduleEdit" size="12" maxlength="10" readOnly="${readOnlyRegistry}"/></td>
</tr>
<tr>
	<td class="moduleLabel"><fw:label property="degree" forId="degreeId"><bean-el:message key="label.registry.degree" />:</fw:label></td>	
	<c:set var="degreeText"><bean-el:message key="label.registry.degree" /> </c:set>
	<td class="moduleValue"><html-el:text title="${degreeText}" property="degree" styleClass="moduleEdit" styleId="degreeId" size="12" maxlength="10" readOnly="${readOnlyRegistry}"/></td>
</tr>