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

<script>
	$(document).ready(
		function() {
			$("#forma input").addClass("form-control");
			validar();			
	    }				
	);			
</script>


<form action="indexactualizaPais.action" id="forma" name="forma" class="form-horizontal" role="form" method="post">
    	
    	<input type="hidden" id="pmn" name="pmn" value="<%=pmn%>"/>
		<input type="hidden" id="pmnReturn" name="pmnReturn" value="${param.pmnReturn}"/>	
		
	    <input type="hidden" name="pais.id" value="${pais.id}"/> 
	    
	    <div class="form-group">
			<div class="col-sm-2">		
				<br>					   
	      		<label class="control-label" for="inputPaisnombre">Nombre:</label>
	      	</div>
	      	<div class="col-sm-3">      			      		
				<s:textfield class="form-control" key="pais.nombre" label="" />							
	      	</div>      		      	
	    </div>	    
	    
	    <div class="form-group">
			<div class="col-sm-2">	      	    
	      		<label class="control-label" for="opcionTerritorio">Territorio:</label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<select id="pais.idTerritorio" name="pais.idTerritorio" class="form-control-sm">
					    <option value="">Seleccione una opcion</option>					    
	                    <c:forEach var="m" items="${catalogoTerritorio}">
		                    <option value="${m.id}"  <c:if test="${pais.idTerritorio == m.id}"> selected="selected"  </c:if> > ${m.descripcion} </option>
	                    </c:forEach>
                </select>	        	
	      	</div>      		      	
	    </div>
	    	    
		<div class="form-group">
			<div class="col-sm-2">	      	    
	      		<label class="control-label" for="inputRegion">Region:</label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<select id="pais.idRegion" name="pais.idRegion" class="form-control-sm">
					    <option value="">Seleccione una opcion</option>					    
	                          <c:forEach var="m" items="${catalogoRegion}">
		                      <option value="${m.idRegion}" <c:if test="${pais.idRegion == m.idRegion}"> selected="selected"  </c:if> > ${m.descripcion} </option>
	                    </c:forEach>
                </select>	        		        	
	      	</div>      		      	
	    </div>
	    
		<div class="form-group">
	      	<div class="col-sm-2">
	      	    <br>	      	    
	      		<label class="control-label" for="inputImpuesto">Impuesto %:</label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<s:textfield class="form-control" key="pais.impuesto" label="Impuesto" />	        	
	      	</div>      		      	
	    </div>
	    
	    <div class="form-group">
	      	<div class="col-sm-2">	      	    
	      		<label class="control-label" for="inputEstatus">Estatus:</label>
	      	</div>
	      	<div class="col-sm-3">      		
	        	<select id="pais.estatus" name="pais.estatus" class="form-control-sm">
					    <option value="">Seleccione una opcion</option>					    	          
		                <option value="1" <c:if test="${pais.estatus == '1'}"> selected="selected" </c:if> >Activo</option>
		                <option value="0" <c:if test="${pais.estatus == '0'}"> selected="selected" </c:if> >Inactivo</option>	                 
                </select>	        	
	      	</div>      		      	
	    </div>
 	    	
		<s:if test="paisActualizado">
			<script type="text/javascript">
		 		showMessage("Pa\u00EDs Actualizado");
		 	</script>
		</s:if>	
		<s:elseif test="regresoAction && !paisActualizado">
			<script type="text/javascript">
		 		showError("Error al actualizar el Pa\u00EDs");
		 	</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">
	        	<button class="btn btn-success" type="submit">Guardar cambios</button>
	    </div>
	    	    
</form>

<script src="${contextPath}/js/dda/admin/catalogos/pais/pais.js?v=${versionJS}"></script>	
<%@include file="/jsp/common/defaultBottomLogin.jsp"%>
