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

<script src="${contextPath}/js/dda/admin/catalogos/addons/addon.js?v=${versionJS}"></script>

<script>
	$(document).ready(
		function() {	
			$("#forma input").addClass("form-control");		
			$( "#inpPreferido" ).val(0);
			$( "#inpPreferido" ).prop('checked', false);
			validarAgregar();
			
	    }
		
	);				
</script>
      
<input type="hidden" id="pmn" name="pmn" value="${pmn}" />
<input type="hidden" id="pmnReturn" name="pmnReturn" value="${pmnReturn}" />

<form action="agregarAddOn.action" onsubmit="return guardarAddOn()" id="forma" name="forma" class="form-horizontal" role="form" >
  	  	  		
		<div class="form-group">
			<div class="col-sm-2">
	      		<label class="control-label" for="input" >Estudio:</label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<select id="inpEstudio" class="form-control-sm" >  
	        		<c:forEach var="stdio" items="${estudios}">
	        			<option value="${stdio.idEstudio}">${stdio.nombre}</option>
	        		</c:forEach>
	        	</select>
	      	</div>      		      	
	    </div>
	    
	   <div class="form-group">
			<div class="col-sm-2">
	      		<label class="control-label" for="input">Pa&iacute;s: </label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<select id="inpPais" class="form-control-sm" >  
	        		<c:forEach var="paisTemp" items="${paises}">
	        			<option value="${paisTemp.idPaisAddOn}">${paisTemp.nombre}</option>
	        		</c:forEach>
	        	</select>     	
	      	</div>      		      	
	    </div>
	    
	      <div class="form-group">
			<div class="col-sm-2">
	      		<label class="control-label" for="input">Revenue Share: </label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<input id="inpRevenueShare" class="form-control" type="text">	        	
	      	</div>      		      	
	    </div>
	    
	    <div class="form-group">
			<div class="col-sm-2">
	      		<label class="control-label" for="input">Precio: </label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<input id="inpPrecio" class="form-control" type="text">	        	
	      	</div>      		      	
	    </div>
  
	    <div class="form-group">
			<div class="col-sm-2">
	      		<label class="control-label" for="input" id="lblVat" >Vat Movil:</label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<input id="inpVat" class="form-control" type="text" onchange="calculaImpuestoMovil()">	        	
	      	</div>      		      	
	    </div>
	    
	    <div class="form-group" id="divArgentinaVat" >
			<div class="col-sm-2">
	      		<label class="control-label" for="input">Vat Fijo: </label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<input id="inpVatFijo" class="form-control" type="text" onchange="calculaImpuestoFijo()">	        	
	      	</div>      		      	
	    </div>
	    
	    <div class="form-group">
			<div class="col-sm-2">
	      		<label class="control-label" for="input" id="lblPrecio">Precio Neto Movil: </label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<input id="inpPrecioNeto" class="form-control" type="text">	        	
	      	</div>      		      	
	    </div>
	    
	    <div class="form-group" id="divArgentinaPrecio" >
			<div class="col-sm-2">
	      		<label class="control-label" for="input">Precio Neto Fijo: </label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<input id="inpPrecioNetoFijo" class="form-control" type="text">	        	
	      	</div>      		      	
	    </div>
	    
	    <div class="form-group">
			<div class="col-sm-2">
	      		<label class="control-label" for="input">Tipo de Cambio: </label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<input id="inpTipoDeCambio" class="form-control" type="text" value="América Móvil" disabled>
	      	</div>      		      	
	    </div>
	    
	     <div class="form-group">
			<div class="col-sm-2">			    
	      		<label class="control-label" for="paraCampoGrupo">C&aacute;lculo Monto por Pais:</label>
	      	</div>
	      	
	      	<div class="col-sm-3">
				<input id="inpCalculoMontoXPais" class="form-control" type="text">
			</div> 
		</div>
		
		<div class="form-group">
			<div class="col-sm-2">			    
	      		<label class="control-label" for="paraCampoGrupo">C&aacute;lculo Revenue Share:</label>
	      	</div>
	      	
	      	<div class="col-sm-3">
				<input id="inpCalculoRevenueShare" class="form-control" type="text">
			</div> 
		</div>
		
		<div class="form-group">
			<div class="col-sm-2">			    
	      		<label class="control-label" for="paraCampoGrupo" >Tarifa M&iacute;nima:</label>
	      	</div>
	      	
	      	<div class="col-sm-3">
				<input id="inpTarifaMinima" class="form-control" type="text">
			</div> 
		</div>
		
		<div class="form-group">
			<div class="col-sm-2">			    
	      		<label class="control-label" for="paraCampoGrupo" >Preferido:</label>
	      	</div>
	      	
	      	<div class="col-sm-3">
				<input id="inpPreferido" type="checkbox" value="0" onclick="cambiaValorCheck()" >
			</div> 
		</div>
	    		
		<s:if test="addOnActualizado">
		 	<script type="text/javascript">
		 			showMessage("Add On Guardado");
		 	</script>
		</s:if>			
		<s:elseif test="addOn != null && !addOnActualizado">
			<script type="text/javascript">
		 		showError("Error al agregar el Add On");
		 	</script>
		</s:elseif>
		
	 	<div class="col-sm-2">
	    	<button class="btn btn-default" type="button" onclick="regreso()">Regresar</button>    	
	    </div>
	        
	    <div class="col-sm-2">
	        <input  class="btn btn-success" type="submit" value="Guardar"/>
	    </div>
	    
	    <br></br>
	    <br></br>
	    <br></br>       
    
</form>
	
<%@include file="/jsp/common/defaultBottomLogin.jsp"%>
