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

updated

parent 2a201d41
Branches
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 {
}
@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
......
<!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>
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment