	<%@include file="/WEB-INF/includeTemplate.inc"%>		
	<%@page import="java.util.*,javax.sql.*,java.sql.*,javax.naming.*,
			com.ejie.aa20b.util.Aa20bConstantes,			
			org.springframework.web.servlet.support.RequestContextUtils
			" %>	
<% 
		String lstrOperacion = (String)request.getAttribute("accion");	   		
%>
	
	<input type="hidden" name="accion"  id="accion"/>
	
	<% if (lstrOperacion.equals(Aa20bConstantes.ACCION_NUEVO)) {%>
	<h2><spring:message code="plantas.alta" /></h2>
	<% } else { %>
	<h2><spring:message code="plantas.mantenimiento" /></h2>
	<% } %>
	<div id="feedbackEditarPlanta"></div>
	<!-- Botonera de gestion -->
	<div id="botonera" class="rup-toolbar ui-widget-header">
	
	<div id="botoneraNuevo">
	<BUTTON aria-disabled="false" id="bt_guardar"  
			class="rup-toolbar_button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary">
			<SPAN class="ui-icon mi-ui-icon" style="background:url('${staticsUrl}/aa20b/images/guardar.png'); top:10px"></SPAN>
			<SPAN class="ui-button-text mi-ui-button-text"><spring:message code="boton.guardar" /></SPAN>
	</BUTTON>
	</div>
	<div id="botoneraModificar">

		<BUTTON aria-disabled="false" id="bt_modificar"  
				class="rup-toolbar_button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary">
				<SPAN class="ui-icon mi-ui-icon" style="background:url('${staticsUrl}/aa20b/images/rup.editar.png'); top:10px"></SPAN>
				<SPAN class="ui-button-text mi-ui-button-text"><spring:message code="boton.modificar" /></SPAN>
		</BUTTON>
		<BUTTON aria-disabled="false" id="bt_nuevo"  
				class="rup-toolbar_button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary">
				<SPAN class="ui-icon mi-ui-icon" style="background:url('${staticsUrl}/aa20b/images/rup.nuevo.png'); top:10px"></SPAN>
				<SPAN class="ui-button-text mi-ui-button-text"><spring:message code="boton.nuevo" /></SPAN>
		</BUTTON>
	</div>
</div>
	
<br>	
	
	<div id="error" style="display:none"></div>
	<div id="aa20beditarPlanta">
		<div id="contenido" style="margin-top:0.3em;margin-bottom:0.3em;width:1000px;">			
			<style>body{background-color:white;}</style>			
			<form id="editarPlantaForm" commandName="editarPlantaForm" name="editarPlantaForm" method="POST"> 		
			<input type="hidden" name="accion"  id="accion" value="<%=lstrOperacion%>"/>
			
			<div class="tabulado">	
				<TABLE class="general" align="left">								
				<tr>
					
					<% if (lstrOperacion.equals(Aa20bConstantes.ACCION_NUEVO)) { %>
					<td></td>
					<td></td>
					<% } else { %>
					<td> <spring:message code="comun.codigo" /> : </td>
					<td><INPUT class="inputFieldOblig" TYPE="TEXT" NAME="idplanta" id="idplanta" value="${Planta.idplanta}" size="20" maxlength="20" readonly/></td>
					<% } %>
				</tr>
				<tr>
					<td> <label for="descCas"><spring:message code="comun.descCas" /></label> : </td>
					<td>
					<label class="" for="cplanta" style="display:none;"><spring:message code="comun.descCas" /></label>
					<INPUT class="inputFieldOblig" TYPE="TEXT" NAME="cplanta" id="cplanta" value="${Planta.cplanta}" size="30" maxlength="25" /></td>
				</tr>
				<tr>
					<td> <label for="eplanta"><spring:message code="comun.descEus" /></label> : </td>
					<td>
					<label class="" for="eplanta" style="display:none;"><spring:message code="comun.descEus" /></label>
					<INPUT class="inputFieldOblig" TYPE="TEXT" NAME="eplanta" id="eplanta" value="${Planta.eplanta}" size="30" maxlength="25" /></td>
				</tr>			
				<tr>
					<td> <label for="rplanta"><spring:message code="comun.descRed" /></label> : </td>
					<td>
					<label class="" for="rplanta" style="display:none;"><spring:message code="comun.descRed" /></label>
					<INPUT class="inputFieldOblig" TYPE="TEXT" NAME="rplanta" id="rplanta" value="${Planta.rplanta}" size="4" maxlength="2" onkeypress="return valida(event)"/></td>
				</tr>			
				<tr>
					<td> <label for="eplanta"><spring:message code="plantas.listado.feini" /></label> : </td>
					<td>
					<label class="" for="feini" style="display:none;"><spring:message code="plantas.listado.feini" /></label>
					<INPUT class="datepicker" TYPE="TEXT" NAME="feini" id="feini" value="${Planta.feini}" size="10" maxlength="10" /></td>
				</tr>			
				<tr>
					<td> <label for="numPlanta"><spring:message code="plantas.listado.numPlanta" /></label> : </td>
					<td>
					<label class="" for="numlanta" style="display:none;"><spring:message code="plantas.listado.numPlanta" /></label>
					<INPUT class="inputFieldOblig" TYPE="TEXT" NAME="numPlanta" id="numPlanta" value="${Planta.numPlanta}" size="4" maxlength="2" /></td>
				</tr>			
				<tr id="checkboxBaja">
					<td> <spring:message code="comun.logica" /> : </td>
					<c:choose>
						<c:when test="${Planta.baja == '1'}">
							<td><input type="checkbox" name="baja"  id="baja" checked  /></td>
						</c:when>
						<c:otherwise>
							<td><input type="checkbox" name="baja"  id="baja"  /></td>
						</c:otherwise>
					</c:choose>
				</tr>														
				</TABLE>
			</div>
			</form>
		</div>
		<div id="dialogoGuardar" style="display: none;">
			<div class='divEspera' style="z-index: 1; float: left; display: block; overflow: hidden;">
			<table width="100%" height="350">
				<tr valign="middle" align="center">
					<td><img id=esperarSincronizar src="${staticsUrl}/aa20b/images/Progressbar.gif" /> <br> <spring:message code="gmao.guardando" /></td>
				</tr>
			</table>
		</div>
		</div>
			
			
		</div>
		
		

	
	
		
	
	