<%layout('layouts/boilerplate')%>
  <div class="container">
    <h1>Upload Chapters </h1>
    <form action="/upload/logout" method="POST">
      <button>Logout</button>
    </form>
    <form action="/upload/chapter/<%=code%>/<%=id%>" method="POST">
      <%for(let i=1; i <=id;i++) {%>
        <div class="mb-3">
          <div class="mb-3">
            <label for="4" class="form-label">Chapter Title <%=i%></label>
            <input type="text" class="form-control" id="4" name="title" required>
          </div>
          <div class="mb-3">
            <label for="3" class="form-label">Hours <%=i%></label>
            <input type="text" class="form-control" id="3" name="hours" required>
          </div>
          <label for="2" class="form-label">Marks <%=i%></label>
          <input type="number" class="form-control" id="2" name="marks">
        </div>
        <%}%>
          <button type="submit" class="btn btn-primary">Submit</button>
    </form>
  </div>