From 7d1935d058c2a4238ec21e341934ee79c1caa43a Mon Sep 17 00:00:00 2001
From: Rhys Nute <nuterd@cardiff.ac.uk>
Date: Tue, 12 Dec 2023 20:01:26 +0000
Subject: [PATCH] updated

---
 .../SmartTowns/Organisation/organisationControllers.java   | 7 +++++++
 src/main/resources/templates/towns-data.html               | 1 +
 src/main/resources/templates/towns.html                    | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java
index 1a768161..71fcc384 100644
--- a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java
+++ b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java
@@ -43,6 +43,13 @@ public class organisationControllers {
         modelAndView.addObject("towns", Towns);
         return modelAndView;
     }
+    @GetMapping("/townForm")
+    public ModelAndView getLocalAuthForm(){
+        ModelAndView modelAndView = new ModelAndView("townForm");
+        modelAndView.addObject("addAddTowns",new Towns());
+        return modelAndView;
+    }
+
     @Autowired
     private addAddTownsRepository addAddTownsRepository;
 
diff --git a/src/main/resources/templates/towns-data.html b/src/main/resources/templates/towns-data.html
index 599b1065..cd1aa590 100644
--- a/src/main/resources/templates/towns-data.html
+++ b/src/main/resources/templates/towns-data.html
@@ -3,6 +3,7 @@
 <head>
     <meta charset="UTF-8">
     <title>Towns</title>
+    <link rel="stylesheet" th:href="@{css/landmarkFormStyle.css}">
     <link rel="stylesheet" th:href="@{css/templatingstyle.css}">
 </head>
 <header th:insert="~{/towns/Templating.html::header}"></header>
diff --git a/src/main/resources/templates/towns.html b/src/main/resources/templates/towns.html
index 89938039..ac04f7e3 100644
--- a/src/main/resources/templates/towns.html
+++ b/src/main/resources/templates/towns.html
@@ -16,7 +16,7 @@
         <li th:text="${towns}"></li>
     </ul>
 </div>
-<button id="submit"><a href="towns-data.html">Towns log in here</button></a>
+<a href="/townForm"><button id="submit">Towns log in here</button></a>
 </body>
 <footer th:insert="~{/towns/Templating.html::footer}"></footer>
 </html>
\ No newline at end of file
-- 
GitLab