-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist.ejs
27 lines (20 loc) · 809 Bytes
/
list.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<%- include("header") -%>
<div class="box" id="heading">
<h1> <%= listTitle %> </h1>
</div>
<div class="box">
<% for (let i=0; i<newListItems.length; i++) { %>
<form action="/delete" method="post">
<div class="item">
<input type="checkbox" value="<%=newListItems[i]._id%>" onChange="this.form.submit()" name = "checkbox">
<p><%= newListItems[i].name %></p>
</div>
<input type="hidden" name="listName" value="<%=listTitle%>"></input>
</form>
<% } %>
<form class="item" action="/" method="post">
<input type="text" name="newItem" placeholder="New Item" autocomplete="off">
<button type="submit" name="list" value="<%= listTitle %>">+</button>
</form>
</div>
<%- include("footer") -%>