diff --git a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java index ba1c4ea7f7ca039d7df8376fa719f6d3cf1fa1d6..1a768161de97c339e550dab6e29bd4a90cd96c05 100644 --- a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java +++ b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java @@ -38,7 +38,7 @@ public class organisationControllers { @GetMapping("/towns") public ModelAndView getTownsPage() { - ModelAndView modelAndView = new ModelAndView("WorkWith/towns.html"); + ModelAndView modelAndView = new ModelAndView("towns"); List<addAddTowns> Towns = addAddTownsRepository.getAllAddTowns(); modelAndView.addObject("towns", Towns); return modelAndView; @@ -46,7 +46,7 @@ public class organisationControllers { @Autowired private addAddTownsRepository addAddTownsRepository; - @PostMapping("/townssub") + @PostMapping("/towns-data") public ModelAndView townsSent(@Valid @ModelAttribute("towns-data") addAddTowns towns, BindingResult bindingResult, Model model) { List<addAddTowns> addtowns = addAddTownsRepository.getAllAddTowns(); diff --git a/src/main/resources/WorkWith/towns-data.html b/src/main/resources/templates/towns-data.html similarity index 95% rename from src/main/resources/WorkWith/towns-data.html rename to src/main/resources/templates/towns-data.html index 5ed858c66b92f30ed51b028350e2e710a9d925c7..024b480c81f2adb7939e74982f83dc85a26679e6 100644 --- a/src/main/resources/WorkWith/towns-data.html +++ b/src/main/resources/templates/towns-data.html @@ -8,7 +8,7 @@ <body> <div id="container1"> <h2>Enter your Local authority</h2> - <form action="local-auth-data.php" method="post" id="data"> + <form action="" method="post" id="data"> <p> <label for="townName">Enter your town</label> <input type="text" name="town_Name" id="townName"> diff --git a/src/main/resources/WorkWith/towns.html b/src/main/resources/templates/towns.html similarity index 59% rename from src/main/resources/WorkWith/towns.html rename to src/main/resources/templates/towns.html index 4b268bd1c67eaf68bdc24e23b6883bbdb7a95b09..50b94596c55bd2f61f78007090809c3915f12756 100644 --- a/src/main/resources/WorkWith/towns.html +++ b/src/main/resources/templates/towns.html @@ -5,15 +5,16 @@ <title>Towns</title> <link rel="stylesheet" href="../static/css/templatingstyle.css"> </head> +<header th:insert="~{/towns/Templating.html::header}"></header> <body> -<h1>Developing a Thriving Town</h1> -<h1>Supporting Local Businesses</h1> +<h3>Developing a Thriving Town</h3> +<h3>Supporting Local Businesses</h3> <p>Giving local businesses a voice in the community</p> -<h1>Empowering Community Spirit</h1> -<h1>Creating the towns Identity</h1> +<h3>Empowering Community Spirit</h3> +<h3>Creating the towns Identity</h3> <div> - <ul th:each="addAddTowns:${addTown}"> - <li th:text="${addAddTowns}"></li> + <ul th:each="towns:${addTown}"> + <li th:text="${towns}"></li> </ul> </div> <button id="submit">Towns log in here</button><a href="towns-data.html"></a>