<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${modo=='normal'}">
<title>AGREGAR DIRECTOR</title>
</c:if>

<c:if test="${modo=='actualizar'}">
<title>ACTUALIZAR DIRECTOR</title>
</c:if>

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/styles/styles.css">
    


</head>
<body>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!-- Importa JSTL -->


<%@ include file="/WEB-INF/view/menu.jsp" %>
	<div id="contenido">
	<c:if test="${modo=='normal'}">
	<h2>Agregar Director</h2>
	</c:if>
	<c:if test="${modo=='actualizar'}">
		<h2>Actualizar Director</h2>
	</c:if>
	
	<c:url var="link" value="/Director/agregarDirector">
    	<c:param name="modo" value="${modo}"/>
	</c:url>

	
		<form:form  action="${link}" method="post" modelAttribute="director">
	
	<div>
        
        <form:hidden  path="id"/>
        
    </div>
    <div>
        <form:label path="nombre">Nombre:</form:label>
        <form:input path="nombre" />
        <form:errors path="nombre" class="error-message" element="div"/>
        
    </div>
    
    <div>
        <form:label path="correo">Email:</form:label>
        <form:input path="correo" type="email" />
         <form:errors path="correo" class="error-message" element="div"/>
    </div>
    
    <c:if test="${modo=='normal'}">
		<button type="submit">Registrar</button>
	</c:if>
	<c:if test="${modo=='actualizar'}">
		<button type="submit">Actualizar</button>
	</c:if>
    
	</form:form>
	</div>
</body>	
