Skip to content
Snippets Groups Projects
Commit 15d7b383 authored by Rhys Nute's avatar Rhys Nute
Browse files

updated

parent 2a201d41
No related branches found
No related tags found
2 merge requests!38Draft: Businesses,!31Resolve "As a user, I want to see a page of local authorities so that I can easily source contact details for a variety of different local authorities."
...@@ -25,7 +25,7 @@ public class organisationControllers { ...@@ -25,7 +25,7 @@ public class organisationControllers {
} }
@GetMapping("/localForm") @GetMapping("/localForm")
public ModelAndView getLocalAuthForm(){ public ModelAndView getLocalAuthForm(){
ModelAndView modelAndView = new ModelAndView("local-auth-data.html"); ModelAndView modelAndView = new ModelAndView("local-auth-data");
modelAndView.addObject("localAuthority",new localAuthority()); modelAndView.addObject("localAuthority",new localAuthority());
return modelAndView; return modelAndView;
} }
...@@ -34,7 +34,7 @@ public class organisationControllers { ...@@ -34,7 +34,7 @@ public class organisationControllers {
@PostMapping("/local-auth-data1") @PostMapping("/local-auth-data1")
public ModelAndView localAuthSent(@Valid @ModelAttribute("localAuthority")localAuthority localAuthority, BindingResult bindingResult, Model model ) { public ModelAndView localAuthSent(@Valid @ModelAttribute("localAuthority")localAuthority localAuthority, BindingResult bindingResult, Model model ) {
if (bindingResult.hasErrors()){ if (bindingResult.hasErrors()){
ModelAndView modelAndView = new ModelAndView("local-auth-data.html", model.asMap()); ModelAndView modelAndView = new ModelAndView("local-auth-data1", model.asMap());
return modelAndView; return modelAndView;
}else{// converts user input using the organisation constructor into a submittable format to the sql table }else{// converts user input using the organisation constructor into a submittable format to the sql table
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en" xmlns="http://www.w3.org/1999/html">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Local Authority</title> <title>Local Authority</title>
<link rel="stylesheet" th:href="@{css/localAuthortyPageStyle.css}"> <link rel="stylesheet" th:href="@{css/landmarkFormStyle.css}">
<link rel="stylesheet" th:href="@{../static/css/templatingstyle.css}"> <link rel="stylesheet" th:href="@{css/templatingstyle.css}">
</head> </head>
<header th:insert="~{/towns/Templating.html::header}"></header> <header th:insert="~{/towns/Templating.html::header}"></header>
<body> <body>
<div id="container1"> <div id="container1">
<h2>Enter your Local authority</h2> <h2>Enter your Local authority</h2>
<form action="/local-auth-data1" method="post" id="data"> <form action="/local-auth-data1" id="data" name="data" method="post">
<p> <br>
<label for="localAuthorityName">Enter your local authority</label> <label for="localAuthorityName">Enter your local authority
<input type="text" name="authority_name" id="localAuthorityName"> <input type="text" field="localAuthorityName" name="authority_name" id="localAuthorityName">
</p> </label><br><br>
<p> <label for="address1">Please enter first line of your address
<label for="address1">Please enter first line of your address</label> <input type="text" name="address_1" id="address1">
<input type="text" name="address_1" id="address1"> </label><br><br>
</p> <label for="address2">Please enter second line of your address (optional)
<p> <input type="text" name="address_2" id="address2">
<label for="address2">Please enter second line of your address (optional)</label> </label><br><br>
<input type="text" name="address_2" id="address2"> <label for="city">Please enter the City/Town
</p> <input type="text" name="city" id="city">
<p> </label><br><br>
<label for="city">Please enter the City/Town</label> <label for="county">Please enter you county (optional)
<input type="text" name="city" id="city"> <input type="text" name="county" id="county">
</p> </label><br><br>
<p> <label for="postcode">Please enter your postcode
<label for="county">Please enter you county (optional)</label> <input type="text" name="post_code" id="postcode">
<input type="text" name="county" id="county"> </label><br><br>
</p> <label for="website">Please enter your website address
<p> <input type="url" name="web_site" id="website">
<label for="postcode">Please enter your postcode</label> </label><br><br>
<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>
<input type="submit" value="Submit"> <input type="submit" value="Submit">
</form> </form>
</div> </div>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<li th:text="${localauthorities}"></li> <li th:text="${localauthorities}"></li>
</ul> </ul>
</div> </div>
<button><a href="local-auth-data.html" id="authority">Local Authorities please enter here</a></button> <a href="/localForm" id="authority"><button>Local Authorities please enter here</a></button>
<footer th:insert=/towns/Templating.html::footer></footer> <footer th:insert="~{/towns/Templating.html::footer}"></footer>
</body> </body>
</html> </html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment