<%- include('partials/head.ejs') %>
<%- include('partials/navbar.ejs') %>

    <div class="container white-text" style="margin: auto; min-width:55%; max-width:max-content;">
        <h1 class="center white-text"><%= titulo %></h1>
        
        <form class="passcontent grey-text text-lighten-1" action="/casodeuso/modificar-casodeuso/<%= idCasoUso %>/<%= idProyecto %>" method="POST">
            <input type="hidden" name="_csrf" value="<%= csrfToken %>" >
            <% for (let elemento of Historiausuario) { %> 
                Yo como
                <input class="white-text" type="text" name="yo_como" value="<%= elemento.yo_como %>" required><br>
                Quiero<br>
                <input class="white-text" type="text" name="quiero" value="<%= elemento.quiero %>" required><br>
                Para<br>
                <input class="white-text" type="text" name="para" value="<%= elemento.para %>" required><br>
                Comentario<br>
                <input class="white-text" type="text" name="comentario" value="<%= elemento.comentario %>" required><br>
                AP<br>
                <div class="input-field col s12 white-text" style="max-width: 35%;">
                    <select class="browser-default transparent" id="name" name="ap" style="border-color: rgba(255, 255, 255, 0.322); color: rgb(255, 255, 255);" required>
                        <option class="black" value="" disabled selected><%= elemento.AP %></option>
                        <option class="black" value="1">1</option>
                        <option class="black" value="2">2</option>
                        <option class="black" value="3">3</option>
                        <option class="black" value="5">5</option>
                        <option class="black" value="8">8</option>
                        <option class="black" value="13">13</option>
                        <option class="black" value="-1">No s√©</option>
                    </select>
                </div>
                
                <input type="hidden" name="idHistoria" value="<%= elemento.idHistoria %>">

                <br>  

                <div class="center">
                    <button class="btn-large waves-effect waves-light green" style="width:18rem;" type="submit" name="action">Modificar Historia
                        <i class="material-icons right">send</i>
                    </button>
                    <p></p>
                    <a href="/proyectos/casodeuso/<%= elemento.idProyecto %>" class="waves-effect waves-light red red btn" style="width:14rem;"><i class="material-icons left">undo</i>Regresar</a>   
                </div>
            </form>
            <% } %>
        

    </div>    

<%- include('partials/footer.ejs')  %>