<%@include file="/WEB-INF/includeTemplate.inc"%>

<!-- Formulario de detalle -->
<div id="pagos_add_div" style="display: none" class="custom_small_dialog">
	
	<!-- Feedback del detalle de los pagos -->
	<div id="pagos_add_feedback"></div>
	
	<!-- Formulario -->
	<spring:url value="../pagos/anadirpago" var="urlAnadirPagos"/>
	<form:form modelAttribute="pagos" id="pagos_add_form" action="${urlAnadirPagos}">
	
		<c:choose>
			<c:when test="${ultimoMesPago + 1 > 12}">
				<c:set var="mesActual" value="1"/>
				<c:set var="anyoActual" value="${ultimoAnyoPago + 1 }"/>
			</c:when>
			<c:otherwise>
				<c:set var="mesActual" value="${ultimoMesPago + 1}"/>
				<c:set var="anyoActual" value="${ultimoAnyoPago}"/>
			</c:otherwise>
		</c:choose>
				
		<div class="form-row row">
			<div class="form-groupMaterial col-md-6">
				<form:input path="anyoPago74" id="anyoPago74_add_div" required="required" maxlength="4" value="${anyoActual}"/>
				<label for="anyoPago74_add_div" class="obligatorio">
					<spring:message code="pagos.anyoPago74"/>
				</label>
			</div>
			<div class="form-groupMaterial col-md-6">
				<form:input path="mesPago74" id="mesPago74_add_div" required="required" maxlength="2" value="${mesActual}"/>
				<label for="mesPago74_add_div" class="obligatorio">
					<spring:message code="pagos.mesPago74"/>
				</label>
			</div>
		</div>

	</form:form>

</div>
