diff --git a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java index 451d1e3f6240a4349a074799c12ed7e61cb7b71c..e91419a93bdee23917a4b5784c0eeb26a9c06106 100644 --- a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java +++ b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java @@ -8,6 +8,7 @@ import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.bind.annotation.PostMapping; @@ -26,10 +27,10 @@ public class organisationControllers { } @Autowired private localAuthorityRepository localAuthorityRepository; - @PostMapping("/local-auth-data") + @GetMapping("/local-auth-data.html") public ModelAndView localAuthSent(@Valid @ModelAttribute("localAuthority")localAuthority localAuthority, BindingResult bindingResult, Model model ) { if (bindingResult.hasErrors()){ - ModelAndView modelAndView = new ModelAndView("local-auth-data", model.asMap()); + ModelAndView modelAndView = new ModelAndView("local-auth-data.html", 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/static/css/localAuthorityPageStyle.css b/src/main/resources/static/css/localAuthorityPageStyle.css new file mode 100644 index 0000000000000000000000000000000000000000..61c59d353fe143d266df045a69f94a8c185827f8 --- /dev/null +++ b/src/main/resources/static/css/localAuthorityPageStyle.css @@ -0,0 +1,16 @@ +body{ + background-color: rgb(41, 41, 41) +} +h1{ + color: wheat; +} +h3{ + color: wheat; +} +ul{ + list-style: none; +} +ul li{ + color: wheat; + list-style: none; +} \ No newline at end of file diff --git a/src/main/resources/templates/local-auth-data.html b/src/main/resources/templates/local-auth-data.html index 46994635dbc62744503aecadc1ea4874d18303b5..abacfb46cf8bad3e393f23084e7e51a868991cf7 100644 --- a/src/main/resources/templates/local-auth-data.html +++ b/src/main/resources/templates/local-auth-data.html @@ -3,14 +3,15 @@ <head> <meta charset="UTF-8"> <title>Local Authority</title> - <link rel="stylesheet" th:href="@{css\allTrails.css}"> - <link rel="stylesheet" th:href="@{css\templatingstyle.css}"> + + <link rel="stylesheet" th:href="@{css/localAuthortyPageStyle.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-data" method="post" id="data" object="localauthsub"> + <form action="/local-auth-data" method="post" id="data" object="local-auth-data"> <p> <label for="localAuthorityName">Enter your local authority</label> <input type="text" name="authority_name" id="localAuthorityName"> diff --git a/src/main/resources/templates/local-authorities.html b/src/main/resources/templates/local-authorities.html index f7f93853a4c9dd6b32f494143135b4307a873a10..a0dab7faaac5e1e94c282545e1bb34c53123bcec 100644 --- a/src/main/resources/templates/local-authorities.html +++ b/src/main/resources/templates/local-authorities.html @@ -3,7 +3,8 @@ <head> <meta charset="UTF-8"> <title>Local Authorities</title> - <link rel="stylesheet" th:href="@{css\templatingstyle.css}"> + <link rel="stylesheet" th:href="@{css/localAuthorityPageStyle.css}"> + <link rel="stylesheet" th:href="@{css/templatingstyle.css}"> </head> <header th:insert="~{/towns/Templating.html::header}"></header> <body>