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

<script src="${contextPath}/js/dda/contrato/minimoSeleccion/minimoSeleccion.js?v=${versionJS}"></script>


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

	<input type="hidden" name="tipoPago" id ='tipoPago'  value="${tipoPago}">
	<input type="hidden" name="idContrato" id ='idContrato' value="${idContrato}">
	<input type="hidden" name="idEstatus" id ='idEstatus' value="${estatus}">

	<div class="form-group">
		<div  class="col-md-offset-3  col-md-5" >
			<div class="form-group">
				<div class="col-xs-1"></div>
				
				<s:if test="tipoPago == 'FLAT'">
					<div class="col-xs-2">
						<label class="control-label" for="campoAnnio">Selecci&oacute;n:</label>
					</div>
					<div class="col-xs-6">
						<select class="form-control" id="campoAnnio" name="campoAnnio" onchange="$('#campoMontoPosicion').hide();">
							<s:iterator value="annios" status="nannios">
								<option value="<s:property value="idContratoPago" /> - <s:property value="annio" />" onclick="">
									Aņo <s:property value="annio" />
								</option>
							</s:iterator>
						</select>
					</div>
					
				</s:if>
				<s:else>
					<div class="col-xs-2">
						<label class="control-label" for="campoPeriodo">Periodo:</label>
					</div>
					<div class="col-xs-6">
						<select class="form-control" id="campoPeriodo" name="campoPeriodo" onchange="$('#campoMontoPosicion').hide();">
							<s:iterator value="periodos" status="nperiodos">
								<option value="<s:property value="idContratoPago" />" onclick="">
									<s:property value="strFechaInicio" />  al  <s:property value="strFechaFin" />
								</option>
							</s:iterator>
						</select>
					</div>
				</s:else>
				
				<div class="col-xs-2">
					<button type="button" class="btn btn-success" onclick="llamaAnnioPeriodoAction()">Consultar</button>
				</div>
				
			</div>
		
		</div>
	</div>


	<div class="form-group" id='campoMontoPosicion'>
		
		<div  class="col-md-offset-3  col-md-5" >
		
			<div class="form-group" >
				
				<div class="col-xs-1"></div>
			
				<div class="col-xs-4">
					<label class="control-label" for="lminimoSeleccion">M&iacute;nimo Selecci&oacute;n:</label>
				</div>	
				
				<div class="col-xs-5">
					<input class="form-control digit" name="annioPeriodo.montoMinimo" id ='campoMontoMinimo' type="number" min="0" <s:if test="estatus > 1">disabled</s:if>>
				</div>
				
				<div class="col-xs-2">
					<input name="campoPeriodos.idMonto" id ='idCampoMontoMinimo' type="hidden" >
				</div>
			
			</div>
			
			<div  id='tablaCategoriasPosicion'></div>
		
		</div>
		
	</div>

	<div id="divButtons">
	
		<div class="form-group">
			<div class="col-xs-3"></div>
			<div class="col-xs-5">
			<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-4 control-label" for="justificacion">Justificaci&oacute;n:</label>
			<div class="col-xs-5"></div>
			<div class="col-xs-3"></div>
		</div>

		<div class="form-group">
			<div class="col-xs-3"></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&aacute;ximo 150 caracteres.</span>
			</div>
			<div class="col-xs-4"></div>
		</div>
	
		<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="button" class="btn btn-success" onclick="llamarModificaCategoriasAction()" <s:if test="estatus > 1">disabled</s:if>>Guardar cambios</button>
			</div>
			<div class="col-xs-1"></div> 
		</div>
		
	</div>
	
	
</form>
<jsp:include page="/jsp/dda/contrato/common/uploadDocument.jsp" />
<%@include file="/jsp/common/defaultBottomLogin.jsp"%>