<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/css/style.css">
    <title>Editar</title>
</head>
<body>
    <%- include('./partials/header.ejs') %> 
    <main>
        <section id="form_criar">
            <form method="post" action="/editar/<%= filmeAtual.id %> ">
                <fieldset>
                <legend id="texto"> Editar Filme: <%= filmeAtual.nome %>  </legend>

                <fieldset class="field">
                <input type="text" name="nome" required value="<%= filmeAtual.nome %>">
                <label for="nome">Nome</label>
                
                </fieldset>

                <fieldset class="field">
                <input type="text" name="diretor" required value="<%= filmeAtual.diretor %>">
                <label for="diretor">Diretor</label>
                </fieldset>

                <fieldset class="field">       
                <input type="url" name="img" required value="<%= filmeAtual.img %>">
                <label for="img">Imagem</label>
                </fieldset>

                <fieldset class="field">               
                <input type="number" name="duracao" required value="<%= filmeAtual.duracao %>">
                <label for="duracao">Duração (min)</label>
                </fieldset>

                <fieldset class="field">
                <input type="text" name="ano" required value="<%= filmeAtual.ano %>">
                <label for="ano">Ano</label>
                </fieldset>

                <fieldset class="field">
                <input type="text" name="iframe" required value="<%= filmeAtual.iframe %>">
                <label for="iframe">Trailer</label>
                </fieldset>
                <div id="bt_div">
                <button id="btadd" type="submit">Alterar</button>
                </div>
            </fieldset>
            </form>
        </section>
    </main>
    
    <%- include('./partials/footer.ejs') %> 
</body>
</html>