<!DOCTYPE html>
<html lang="en">

<head>
    <link rel="stylesheet" href="/stylesheets/adminNav.css">
    <link rel="stylesheet" href="/stylesheets/add.css">
    <%- include("partials/header.ejs") %>
</head>

<body>
    <%- include("partials/loading.ejs") %>
        <%- include("partials/adminNav.ejs") %>
            <%- include("partials/adminPageLink.ejs") %>
                <form method="post" id="addForm">
                    <h2>Add <%= option %>
                    </h2>
                    <% if (error) { %>
                        <div class="messageBlock">
                            <p id="message">
                                <%= error %>
                            </p>
                        </div>
                        <% } %>
                            <table>
                                <thead>
                                    <% for(var i=1; i< keys.length; i++) { %>
                                        <% if(keys[i] !== 'courses') { %>
                                            <tr>
                                                <td>
                                                    <%= keys[i] %>:
                                                </td>
                                                <td><input type="text" name="<%= keys[i] %>" required></td>
                                            </tr>
                                        <% } %>
                                    <% } %>
                                </thead>
                            </table>
                            <button id="saveButton" type="submit">Save</button>
                </form>
</body>

</html>