<%@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-xs-1"></div>
			
				<div class="col-xs-4">
					<label class="control-label" for="lminimoSeleccion">M&iacutenimo Selecci&oacuten:</label>
				</div>	
				
				<div class="col-xs-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-xs-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&iacutea</th>
			    		<th style="width: 100px;">T&iacutetulos</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-xs-2"></div>
			<div class="col-xs-6">
			<jsp:include page="/jsp/dda/contrato/common/justificacion.jsp" /></div>
			<div class="col-xs-4"></div>
		</div>

		<div class="form-group">
			<label class="col-xs-3 control-label" for="justificacion">Justificaci&oacuten:</label>
			<div class="col-xs-5"></div>
			<div class="col-xs-4"></div>
		</div>
	
	<div class="form-group">
			<div class="col-xs-2"></div>
			<div class="col-xs-5">
				<textarea class="form-control" rows="3" id="justificacion"
					name="justificacion" maxlength="150">${justificacion}</textarea>
				<span class="help-block">Máximo 150 caracteres.</span>
			</div>
			<div class="col-xs-5"></div>
		</div>
	<br>
	
	<div class="form-group">
		<div class="col-xs-1"></div>
		<div class="col-xs-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-toggle="modal" data-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-xs-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"%>