From fc3fffece6905e1baf2482c844533c7fb4c0a885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Tue, 19 Nov 2019 19:48:18 +0100 Subject: Add contact list submission front-end --- .../mimuw/cloudatlas/client/ClientController.java | 12 +++++++++ .../cloudatlas/client/templates/contactsForm.html | 29 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html (limited to 'src') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java index 01a0b94..c092d4f 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java @@ -36,4 +36,16 @@ public class ClientController { model.addAttribute("homeMessage", "Query submitted successfully"); return "home"; } + + @GetMapping("/contacts") + public String contactPage(Model model) { + return "contactsForm"; + } + + @PostMapping("/contacts") + public String contactPage(@ModelAttribute String contactsObject, Model model) { + System.out.println(contactsObject); + model.addAttribute("homeMessage", "Contact list submitted successfully"); + return "home"; + } } diff --git a/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html new file mode 100644 index 0000000..8ed563f --- /dev/null +++ b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html @@ -0,0 +1,29 @@ + + + + + + Query form + + + + + +
+
+
+
+ + +
+ +
+
+ + + + + + + + \ No newline at end of file -- cgit v1.2.3