<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form" %>

<smvc:form name=" " method="post" onsubmit = "return submitTheForm();">
<input type="hidden" name="redirectParams" value="<c:out value="${requestScope['javax.servlet.forward.query_string']}" />" />
<input type="hidden" id="accessionNum" name="accessionNum" value='<%=request.getAttribute("accessionNum")%>'/> 
<input type="hidden" id="noteId" name="noteId" value="<c:out value="${consultationNoteForm.view.note.id}"/>"/> 
  	<div>
		&nbsp;
	</div>
	&nbsp;
	<div class="bodySection1">&nbsp;
	
		<c:if test="${requestScope.successMsg != null and fn:length(requestScope.successMsg) != 0}">
					<div class="message"><img
						src="../images/16x16/information.png" alt="i" />&nbsp;
					<c:out value="${requestScope.successMsg}"/><br/><br/>
					</div>
		</c:if>
	
		<c:if test="${requestScope.errorMsg != null and fn:length(requestScope.errorMsg) != 0}">
			<div class="error"><img
				src="../images/16x16/error.png" alt="i" />&nbsp;
			<c:out value="${requestScope.errorMsg}"/><br/><br/>
			</div>
		</c:if>
	<c:set var="accessionNum" value='<%=request.getAttribute("accessionNum")%>'/>
	     <div class="rowDivSubPage" style="width:100%">
				<div>
					<b>Request Resend of Images</b>
				</div>
				<div class="rowDivSmall">
					&nbsp;
				</div>
				<div>
					Request resend of images for accession number 
					<b><c:if test="${accessionNum ne null}"><c:out value="${accessionNum}"/></c:if></b>
				&nbsp;&nbsp;
				</div>
				<div>
					&nbsp;
				</div>
				<div>
					Choose Method:
					<select name="selectedMethod" id="selectedMethod">
						<c:forEach items="${imageTransferMethods}" var="transferMethod">
							<c:choose>
								<c:when test="${transferMethod.imgTansMethod.imgTransCode eq selectedMethod}">
									<option selected="selected"  value="<c:out value="${transferMethod.imgTansMethod.imgTransCode}"/>"><c:out value="${transferMethod.imgTansMethod.description}"/></option>
								</c:when>
								<c:otherwise>
									<option value="<c:out value="${transferMethod.imgTansMethod.imgTransCode}"/>"><c:out value="${transferMethod.imgTansMethod.description}"/></option>
								</c:otherwise>
							</c:choose>
									
						</c:forEach>
						</select>
						
				</div>
				<div>
						&nbsp;
						
				</div>
				<div class="rowDivSmall">&nbsp;</div>	
				<div class="updateButtonHolderOn">
					<c:choose>
							<c:when test="${accessionNum ne null}">
								<input type="submit" value="Request Image Transfer"/>
							</c:when>
							<c:otherwise>
								<input type="submit" value="Request Image Transfer" disabled="disabled"/>
							</c:otherwise>
						</c:choose>
				
				<input type="reset" value="Back" onclick="document.location.href ='../referrals/imgStatusTracking.form'"/>
				
				</div>
	      </div>
	</div>
</smvc:form>