events.ejs
1.55 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<h1><%= id %></h1>
<div id="events" style="width:200px;float:left">
<% calendars.forEach(function(val){ %>
<form action="/events/remove" method="POST">
<p>summary : <%= val.summary %></p>
<p>created : <%= val.created %></p>
<p>start : <%= val.start.dateTime %></p>
<p>end : <%= val.end.dateTime %></p>
<input type="hidden" name="eId" value=<%= val.id %>>
<input type="submit" value="Delete">
</form>
<% }) %>
</div>
<div id="menu" style="width:100px;float:right">
<div id="add" style="width:100px;height:50px">
<h2>Add Event!</h2>
<form name="add" action="/events/add" method="POST">
<input type="hidden" name="id" value=<%= id %> >
Summary:<br>
<input type="text" name="summary" placeholder="Summary of event">
Location:<br>
<input type="text" name="location" placeholder="Location ot event">
Desciption:<br>
<input type="text" name="description" placeholder="Description">
Start Day:<br>
<input type="date" name="startDay">
Start Time:<br>
<input type="time" name="startTime">
End Day:<br>
<input type="date" name="endDay">
End Time:<br>
<input type="time" name="endTime">
<input type="submit" name="submit" value="Add">
</form>
</div>
</div>
</body>
</html>