Skip to content

Commit e55d004

Browse files
committed
modified form
1 parent 8219dea commit e55d004

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

src/main/java/org/launchcode/codingevents/controllers/EventController.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,9 @@ public String displayAllEvents(Model model) {
2626
return "events/index";
2727
}
2828

29+
@GetMapping("create")
30+
public String renderCreateEventForm(){
31+
return "events/create";
32+
}
33+
2934
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Create Event</title>
6+
</head>
7+
<body>
8+
<h1>Create Event</h1>
9+
<form method = "post" action = "/events/create">
10+
<input type = "text" name = "eventName">
11+
<input type = "submit" value = "Create Event">
12+
</form>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)