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

updated

parent e386e204
No related branches found
No related tags found
1 merge request!39Draft: Towns
...@@ -38,7 +38,7 @@ public class organisationControllers { ...@@ -38,7 +38,7 @@ public class organisationControllers {
@GetMapping("/towns") @GetMapping("/towns")
public ModelAndView getTownsPage() { public ModelAndView getTownsPage() {
ModelAndView modelAndView = new ModelAndView("WorkWith/towns.html"); ModelAndView modelAndView = new ModelAndView("towns");
List<addAddTowns> Towns = addAddTownsRepository.getAllAddTowns(); List<addAddTowns> Towns = addAddTownsRepository.getAllAddTowns();
modelAndView.addObject("towns", Towns); modelAndView.addObject("towns", Towns);
return modelAndView; return modelAndView;
...@@ -46,7 +46,7 @@ public class organisationControllers { ...@@ -46,7 +46,7 @@ public class organisationControllers {
@Autowired @Autowired
private addAddTownsRepository addAddTownsRepository; private addAddTownsRepository addAddTownsRepository;
@PostMapping("/townssub") @PostMapping("/towns-data")
public ModelAndView townsSent(@Valid @ModelAttribute("towns-data") addAddTowns towns, BindingResult bindingResult, Model model) { public ModelAndView townsSent(@Valid @ModelAttribute("towns-data") addAddTowns towns, BindingResult bindingResult, Model model) {
List<addAddTowns> addtowns = addAddTownsRepository.getAllAddTowns(); List<addAddTowns> addtowns = addAddTownsRepository.getAllAddTowns();
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<body> <body>
<div id="container1"> <div id="container1">
<h2>Enter your Local authority</h2> <h2>Enter your Local authority</h2>
<form action="local-auth-data.php" method="post" id="data"> <form action="" method="post" id="data">
<p> <p>
<label for="townName">Enter your town</label> <label for="townName">Enter your town</label>
<input type="text" name="town_Name" id="townName"> <input type="text" name="town_Name" id="townName">
......
...@@ -5,15 +5,16 @@ ...@@ -5,15 +5,16 @@
<title>Towns</title> <title>Towns</title>
<link rel="stylesheet" href="../static/css/templatingstyle.css"> <link rel="stylesheet" href="../static/css/templatingstyle.css">
</head> </head>
<header th:insert="~{/towns/Templating.html::header}"></header>
<body> <body>
<h1>Developing a Thriving Town</h1> <h3>Developing a Thriving Town</h3>
<h1>Supporting Local Businesses</h1> <h3>Supporting Local Businesses</h3>
<p>Giving local businesses a voice in the community</p> <p>Giving local businesses a voice in the community</p>
<h1>Empowering Community Spirit</h1> <h3>Empowering Community Spirit</h3>
<h1>Creating the towns Identity</h1> <h3>Creating the towns Identity</h3>
<div> <div>
<ul th:each="addAddTowns:${addTown}"> <ul th:each="towns:${addTown}">
<li th:text="${addAddTowns}"></li> <li th:text="${towns}"></li>
</ul> </ul>
</div> </div>
<button id="submit">Towns log in here</button><a href="towns-data.html"></a> <button id="submit">Towns log in here</button><a href="towns-data.html"></a>
......
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