diff --git a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java index 3f153cf76bcd34977c778fe3f9e0ead22b3ea41c..14bd8685b8d055580621ca773b09873d4280a19a 100644 --- a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java +++ b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java @@ -43,8 +43,8 @@ public class organisationControllers { modelAndView.addObject("towns", Towns); return modelAndView; } - @GetMapping("/townForm") - public ModelAndView getLocalAuthPage(){ + @GetMapping("/townsForm") + public ModelAndView getTownsSubPage(){ ModelAndView modelAndView = new ModelAndView("towns-data"); modelAndView.addObject("addAddTowns",new addAddTowns()); return modelAndView; diff --git a/src/main/resources/templates/towns-data.html b/src/main/resources/templates/towns-data.html index 5d8762910516b1880dd830bc4c7ba87a7cbff9e5..c15d05ae3df08b7ff425c4d4e6b3f349323fe637 100644 --- a/src/main/resources/templates/towns-data.html +++ b/src/main/resources/templates/towns-data.html @@ -10,32 +10,26 @@ <body> <div id="container1"> <h2>Enter your Town</h2> - <form action="\town-data" method="post" id="data" name="data" th:object="*{towns-data}"> + <form action="\town-data" method="post" id="data" name="data" th:object="${addAddTowns}"> <label>Enter your town - <input type="text" th:field="*{townName}" name="town_Name" id="townName"> + <input type="text" th:field="*{townName}"> </label><br><br> - <label for="address1">Please enter first line of your address - <input type="text" name="address_1" id="address1"> + <label>Please enter first line of your address + <input type="text" th:field="*{address1}"> + </label><br><br> + <label>Please enter second line of your address (optional) + <input type="text" th:field="*{address2}"> </label><br><br> - </p> - <p> - <label>Please enter second line of your address (optional)</label> - <input type="text" th:field="*{address2}"> - </p> - <p> <label>Please enter the City/Town - <input type="text" th:field="*{city}"> - </label> - </p> - <p> - <label for="county">Please enter you county (optional)</label> - <input type="text" name="county" id="county"> - </p> - <p> - <label for="postcode">Please enter your postcode</label> - <input type="text" name="post_code" id="postcode"> - </p> - <input type="submit" value="Submit Data"> + <input type="text" th:field="*{city}"> + </label><br><br> + <label>Please enter you county (optional) + <input type="text" th:field="*{county}" name="county" id="county"> + </label><br><br> + <label for="postcode">Please enter your postcode + <input type="text" name="post_code" id="postcode"> + </label><br><br> + <input type="submit"> </form> </div> </body>