diff --git a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java index 05cfe0bacd7b0a0cfb54329182f49025533f2311..dbb21d3a3a8111104b0801b1b12b4a16e5b2403f 100644 --- a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java +++ b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java @@ -25,7 +25,7 @@ public class organisationControllers { } @GetMapping("/localForm") public ModelAndView getLocalAuthForm(){ - ModelAndView modelAndView = new ModelAndView("local-auth-data.html"); + ModelAndView modelAndView = new ModelAndView("local-auth-data"); modelAndView.addObject("localAuthority",new localAuthority()); return modelAndView; } @@ -34,7 +34,7 @@ public class organisationControllers { @PostMapping("/local-auth-data1") public ModelAndView localAuthSent(@Valid @ModelAttribute("localAuthority")localAuthority localAuthority, BindingResult bindingResult, Model model ) { if (bindingResult.hasErrors()){ - ModelAndView modelAndView = new ModelAndView("local-auth-data.html", model.asMap()); + ModelAndView modelAndView = new ModelAndView("local-auth-data1", model.asMap()); return modelAndView; }else{// converts user input using the organisation constructor into a submittable format to the sql table diff --git a/src/main/resources/templates/local-auth-data.html b/src/main/resources/templates/local-auth-data.html index 3bfcf75d6428e7f5c698d21a532e21d4f9dff7d2..dd217e1fb3643145f8968ed3fb9a2f0928d34ba0 100644 --- a/src/main/resources/templates/local-auth-data.html +++ b/src/main/resources/templates/local-auth-data.html @@ -1,45 +1,39 @@ <!DOCTYPE html> -<html lang="en"> +<html lang="en" xmlns="http://www.w3.org/1999/html"> <head> <meta charset="UTF-8"> <title>Local Authority</title> - <link rel="stylesheet" th:href="@{css/localAuthortyPageStyle.css}"> - <link rel="stylesheet" th:href="@{../static/css/templatingstyle.css}"> + <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> <body> <div id="container1"> <h2>Enter your Local authority</h2> - <form action="/local-auth-data1" method="post" id="data"> - <p> - <label for="localAuthorityName">Enter your local authority</label> - <input type="text" name="authority_name" id="localAuthorityName"> - </p> - <p> - <label for="address1">Please enter first line of your address</label> - <input type="text" name="address_1" id="address1"> - </p> - <p> - <label for="address2">Please enter second line of your address (optional)</label> - <input type="text" name="address_2" id="address2"> - </p> - <p> - <label for="city">Please enter the City/Town</label> - <input type="text" name="city" id="city"> - </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> - <p> - <label for="website">Please enter your website address</label> - <input type="url" name="web_site" id="website"> - </p> + <form action="/local-auth-data1" id="data" name="data" method="post"> + <br> + <label for="localAuthorityName">Enter your local authority + <input type="text" field="localAuthorityName" name="authority_name" id="localAuthorityName"> + </label><br><br> + <label for="address1">Please enter first line of your address + <input type="text" name="address_1" id="address1"> + </label><br><br> + <label for="address2">Please enter second line of your address (optional) + <input type="text" name="address_2" id="address2"> + </label><br><br> + <label for="city">Please enter the City/Town + <input type="text" name="city" id="city"> + </label><br><br> + <label for="county">Please enter you county (optional) + <input type="text" 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> + <label for="website">Please enter your website address + <input type="url" name="web_site" id="website"> + </label><br><br> <input type="submit" value="Submit"> </form> </div> diff --git a/src/main/resources/templates/local-authorities.html b/src/main/resources/templates/local-authorities.html index 577f8fdcbd649e8aff39ca40eb1ea4325c7509a5..ecf80b64688cf9fc7f72ac8a25b0bc2fb1fe2e80 100644 --- a/src/main/resources/templates/local-authorities.html +++ b/src/main/resources/templates/local-authorities.html @@ -14,7 +14,7 @@ <li th:text="${localauthorities}"></li> </ul> </div> -<button><a href="local-auth-data.html" id="authority">Local Authorities please enter here</a></button> -<footer th:insert=/towns/Templating.html::footer></footer> +<a href="/localForm" id="authority"><button>Local Authorities please enter here</a></button> +<footer th:insert="~{/towns/Templating.html::footer}"></footer> </body> </html> \ No newline at end of file