<%@include file="/WEB-INF/includeTemplate.inc"%>
<%@page import="org.springframework.web.servlet.support.RequestContextUtils"%>
<% String lang = RequestContextUtils.getLocale(request).getLanguage(); 
	lang=Character.toUpperCase(lang.charAt(0)) + lang.substring(1);
	String idFormLupaPersona = (request.getParameter("idFormLupaPersona") != null && 
								request.getParameter("idFormLupaPersona").trim().length()>0)? request.getParameter("idFormLupaPersona"): "";
	String entityPathLupaPersona = (request.getParameter("entityPathLupaPersona") != null && 
								request.getParameter("entityPathLupaPersona").trim().length()>0)? request.getParameter("entityPathLupaPersona")+"." : "";
								
%>
<c:set var="idFormDireccion" value="<%=idFormLupaPersona%>" />
<c:set var="entityPathDireccion" value="<%=entityPathLupaPersona%>" />
<div id="<%=idFormLupaPersona%>_detail_div" class="rup-table-formEdit-detail" 
	style="padding-top: 0.6em; display: none;">
	<div class="div_obligatorios" >
		<span class="obligatorios">*</span> <spring:message code="comun.obligatorios"/>
	</div>
	<div class="ui-dialog-content ui-widget-content" >
		<form id="<%=idFormLupaPersona%>_detail_form">					<!-- Formulario -->
			<div id ="<%=idFormLupaPersona%>_detail_feedback"></div>		<!-- Feedback del formulario de detalle -->
			<div class="divDatosDetalle" >
				<fieldset title="<spring:message code="persona.fieldset.titular.desc" />">
					<legend align="left"><spring:message code="persona.fieldset.titular.text"/></legend>
					<%-- CAMPOS DEL FORMULARIO --%>	
					<!-- FEC_HORA -->
					<jsp:include page="/WEB-INF/views/commons/concurrency/concurrency.jsp">
						    <jsp:param name="idForm" value="${idFormDireccion}" />
						    <jsp:param name="entityBean" value="${entityPathDireccion}" />
					</jsp:include>	
					<!-- Campo oculto idPersona -->
					<input type="hidden" name="<%=entityPathLupaPersona%>idPersona" id="detail_form_<%=idFormLupaPersona%>_idPersona" />
					<div class="saltoLinea floatLeft ">
						<div class="saltoLinea">
							<%-- tipo Identificador --%>
							<div class="floating_left_pad_right">
								<!-- INCLUIR LABEL+INPUT -->
								<label for="detail_form_<%=idFormLupaPersona%>_tipoCodigoId_codTabla_label"><spring:message code="persona.tipo" /></label> <br> 
								<input type="text" name="<%=entityPathLupaPersona%>tipoCodigoId.codTabla" id="detail_form_<%=idFormLupaPersona%>_tipoCodigoId_codTabla" 
								class="formulario_linea_input" size="15"/>
							</div>
						</div>
						<div class="saltoLinea">
							<%-- identificador --%>
							<div class="floating_left_pad_right">
								<!-- INCLUIR LABEL+INPUT -->
								<label for="detail_form_<%=idFormLupaPersona%>_codigoId"><spring:message code="persona.identificador" /> </label> <br> 
								<input type="text" size="11" maxlength="11" name="<%=entityPathLupaPersona%>codigoId" 
								id="detail_form_<%=idFormLupaPersona%>_codigoId"	class="formulario_linea_input keyUpperCase" />
								<input type="text" size="2" maxlength="2" name="<%=entityPathLupaPersona%>numCorrelNif" 
								id="detail_form_<%=idFormLupaPersona%>_numCorrelNif" 	class="formulario_linea_input disabled" disabled />
								<button id="<%=idFormLupaPersona%>_btnCalcularLetraDni" class="letra_control_button" 
								title="<spring:message code="boton.calcularLetraCtrl" />"></button>
								<button id="<%=idFormLupaPersona%>_btnConsultaSVDI" class="svdi_button"
								title="<spring:message code="boton.svdi" />"></button>
							</div>
						</div>
					</div>
					<div class="floatLeft" style="margin-left: 1em;">
						<!-- HEREDAR DATOS TITULAR -->
						<jsp:include page="/WEB-INF/views/commons/persona/filter/persona_filter-included.jsp">
							<jsp:param name="idForm" value="${idFormDireccion}_filter" />
							<jsp:param name="title" value="persona.fieldset.herencia.text" />
						</jsp:include>
						
					</div>
					<%-- nombre --%>
					<div class="saltoLinea">
						<div class="floating_left_pad_right div_una_columna">
							<!-- INCLUIR LABEL+INPUT -->
							<label for="detail_form_<%=idFormLupaPersona%>_nombre"><spring:message code="persona.nombre"/></label><br>
							<input type="text" size="100" maxlength="100" name="<%=entityPathLupaPersona%>nombre" 
							id="detail_form_<%=idFormLupaPersona%>_nombre" class="formulario_linea_input"/>
						</div>
					</div>
					<div class="saltoLinea" id="<%=idFormLupaPersona%>_apellidos">
						<%-- apellido1 --%>					
						<div class="floating_left_pad_right div_dos_columnas">
							<!-- INCLUIR LABEL+INPUT -->
							<label for="detail_form_<%=idFormLupaPersona%>_apellido1"><spring:message code="persona.apellido1"/></label><br>
							<input type="text" size="40" maxlength="40" name="<%=entityPathLupaPersona%>apellido1" 
							id="detail_form_<%=idFormLupaPersona%>_apellido1" class="formulario_linea_input"/>
						</div>
						
						<%-- apellido2 --%>					
						<div class="floating_left_pad_right div_dos_columnas">
							<!-- INCLUIR LABEL+INPUT -->
							<label for="detail_form_<%=idFormLupaPersona%>_apellido2"><spring:message code="persona.apellido2"/></label><br>
							<input type="text" size="40" maxlength="40" name="<%=entityPathLupaPersona%>apellido2" 
							id="detail_form_<%=idFormLupaPersona%>_apellido2" class="formulario_linea_input"/>
						</div>
					</div>
				<jsp:include page="/WEB-INF/views/commons/nora/direccion-included.jsp">
					<jsp:param name="idForm" value="detail_form_${idFormDireccion}" />
					<jsp:param name="entityPath" value="${entityPathDireccion}direccion" />
				</jsp:include>
				<div class="saltoLinea">
					<fieldset id="<%= idFormLupaPersona %>_fldSetDatosContacto" class="expandable" title="<spring:message code="persona.fieldset.contacto.desc"/>">
					<legend align="left" class="legendAcordeon">
						<div class="expanded-legend">
							<span class="expanded-icon"></span><spring:message code="persona.fieldset.contacto.text"/>
						</div>
					</legend>
					<!-- ****** CONTENIDO DEL ACORDEON ****** -->
					<div id="<%=idFormLupaPersona%>_datosContacto" class="divDatosDetalle" visible="yes">	
						<div class="saltoLinea">
							<div class="floating_left_pad_right div_cinco_columnas">
						       <label for="detail_form_<%=idFormLupaPersona%>_telefono1" ><spring:message code="persona.contacto.telefono1" /></label><br>
								<input type="text" name="<%=entityPathLupaPersona%>telefno1" class="formulario_linea_input" 
								id="detail_form_<%=idFormLupaPersona%>_telefono1" maxlength="9" size="9"/>
						    </div>
				    
						    <div class="floating_left_pad_right div_cinco_columnas">
						        <label for="detail_form_<%=idFormLupaPersona%>_telefono2" ><spring:message code="persona.contacto.telefono2" /></label><br>
								<input type="text" name="<%=entityPathLupaPersona%>telefno2" class="formulario_linea_input" 
								id="detail_form_<%=idFormLupaPersona%>_telefono2" maxlength="9" size="9"/>
						    </div>
				
						    <div class="floating_left_pad_right div_dos_columnas">
						       <label for="detail_form_<%=idFormLupaPersona%>_email" ><spring:message code="persona.contacto.email" /></label><br>
								<input type="text" name="<%=entityPathLupaPersona%>email" class="formulario_linea_input text_mayus" 
								id="detail_form_<%=idFormLupaPersona%>_email" maxlength="40" size="40"/>
						    </div>	
						</div>
						<!-- MUY IMPORTANTE PARA QUE SALGAN LOS ELEMENTOS DENTRO DEL FIELDSET -->
						<div class="clearfix"></div>
					</div>
					</fieldset>
				</div>
				
				<div class="saltoLinea">
					<div class="floating_left_pad_right div_tres_columnas">
						<!-- INCLUIR LABEL+INPUT -->
						<label for="detail_form_<%=idFormLupaPersona%>_fecNacimiento"><spring:message code="persona.fechaNacimiento"/></label><br>
						<input type="text" size="10" maxlength="10" name="<%=entityPathLupaPersona%>fecNacimiento" 
						id="detail_form_<%=idFormLupaPersona%>_fecNacimiento" class="formulario_linea_input"/>
					</div>
				  	<div class="floating_left_pad_right div_tres_columnas">
						<label for="detail_form_<%=idFormLupaPersona%>_estadoCivil_codTabla_label" ><spring:message code="persona.estadoCivil" /></label><br>
						<input type="text" name="<%=entityPathLupaPersona%>estadoCivil.codTabla" class="formulario_linea_input" 
						id="detail_form_<%=idFormLupaPersona%>_estadoCivil_codTabla" size="30"/>
					</div>
				    <div class="floating_left_pad_right div_tres_columnas">
				       <label for="detail_form_<%=idFormLupaPersona%>_sexo_codTabla_label" ><spring:message code="persona.sexo" /></label><br>
						<input type="text" name="<%=entityPathLupaPersona%>sexo.codTabla" class="formulario_linea_input text_mayus" 
						id="detail_form_<%=idFormLupaPersona%>_sexo_codTabla" />
					</div>
				</div>
				<div class="saltoLinea">
					
					<div class="floating_left_pad_right ">
						<label for="detail_form_<%=idFormLupaPersona%>_nacionalidad_id_label" ><spring:message code="persona.nacionalidad" /></label><br>
						<input type="text" name="<%=entityPathLupaPersona%>nacionalidad.id" class="formulario_linea_input text_mayus" 
						id="detail_form_<%=idFormLupaPersona%>_nacionalidad_id" size="45"/>
							
					</div>	
				</div>
			<!-- Fin campos del formulario de detalle -->				
				</fieldset>
			</div>
		</form>
	</div>
	<!-- Botonera del formulario de detalle -->
	<div class="rup-table-buttonpane ui-widget-content ui-helper-clearfix">
		<div class="ui-dialog-buttonset">
			<!-- Botón Guardar -->
			<button id="<%=idFormLupaPersona%>_detail_button_save" type="button">
				<spring:message code="save" />
			</button>
			<!-- Enlace cancelar -->
			<a href="javascript:void(0)" id="<%=idFormLupaPersona%>_detail_link_cancel"
				class="rup-enlaceCancelar"><spring:message code="cancel" /></a>
		</div>
	</div>
</div>
