<%@include file="/jsp/common/defaultTopLogin.jsp"%>

<form action="minimoSeleccion/cambioMinimo" method="post" name="forma" id="forma">

	<input type="hidden" name="idContrato" value="${idContrato}">
	
	<s:iterator value="periodos" status="nperiodos">
		
		<div class="form-group">
			
			<div  class="col-md-offset-2  col-md-5" >
				<h4> Periodo <s:property value="periodos.size - #nperiodos.count + 1" />: <s:property value="sfechaInicio" /> al <s:property value="sfechaFin" /> </h4>
			<br>
			
			
			
			<div class="form-group">
				
				<div class="col-sm-1"></div>
			
				<div class="col-sm-4">
					<label class="control-label" for="lminimoSeleccion">M&iacute;nimo Selecci&oacute;n:</label>
				</div>	
				
				<div class="col-sm-5">
					<input class="form-control digit" name="campoPeriodos[<s:property value="#nperiodos.index" />].montoMinimo" type="number" value="<s:property value="minimoMonto" />" <s:if test="estatus > 1">disabled</s:if>>
				</div>
				
				<div class="col-sm-2">
					<input name="campoPeriodos[<s:property value="#nperiodos.index" />].idMonto" type="hidden" value="<s:property value="idContratoPago" />">
				</div>
			
			</div>
			
			<table class="table table-striped table-hover ">
				<thead>
					<tr class="encabezado">
			    		<th style="width: 200px;">Categor&iacute;a</th>
			    		<th style="width: 100px;">T&iacute;tulos</th>
			  		</tr>
				</thead>
				<tbody>
					<s:iterator value="detallePeriodo" status="ndetallePeriodo">
						<tr>
							<td><s:property value="descripcionCategoria" /></td>
							<td><input type="number" name="campoPeriodos[<s:property value="#nperiodos.index" />].pareja.cat_<s:property value="idPagoCategoria" />" class="form-control digit" <s:if test="estatus > 1">disabled</s:if> value= "<s:property value="minimoTitulos" />"/></td>
						<tr>
					</s:iterator>
				</tbody>
			</table>
			</div>
		
		</div>
			
	</s:iterator>
	
	<div class="form-group">
			<div class="col-sm-2"></div>
			<div class="col-sm-6">
			<jsp:include page="/jsp/dda/contrato/common/justificacion.jsp" /></div>
			<div class="col-sm-4"></div>
		</div>

		<div class="form-group">
			<label class="col-sm-3 control-label" for="justificacion">Justificaci&oacute;n:</label>
			<div class="col-sm-5"></div>
			<div class="col-sm-4"></div>
		</div>
	
	<div class="form-group">
			<div class="col-sm-2"></div>
			<div class="col-sm-5">
				<textarea class="form-control" rows="3" id="justificacion"
					name="justificacion" maxlength="150">${justificacion}</textarea>
				<span class="help-block">M&aacute;ximo 150 caracteres.</span>
			</div>
			<div class="col-sm-5"></div>
		</div>
	<br>
	
	<div class="form-group">
		<div class="col-sm-1"></div>
		<div class="col-sm-10 centrar-elemento">
			<a href="../../contrato/listado/irListado?pmn=<%=pmnReturn%>&tipoContrato=${tipoContrato}" class="btn btn-default" roll="button" >Regresar</a>
			<button class="btn btn-info" type="button" data-bs-toggle="modal" data-bs-target="#modalDocum" <s:if test="estatus > 1">disabled</s:if>>Subir documento</button>
			<button type="submit" class="btn btn-success" <s:if test="estatus > 1">disabled</s:if>>Guardar cambios</button>
		</div>
		<div class="col-sm-1"></div> 
	</div>
	
	
	
</form>
<jsp:include page="/jsp/dda/contrato/common/uploadDocument.jsp" />
<script src="${contextPath}/js/dda/contrato/minimoSeleccion/validacionesMinimoSeleccion.js?v=${versionJS}"></script>

<%@include file="/jsp/common/defaultBottomLogin.jsp"%>