Added candidate suggestion
- CHANGES: VotingControler:
-- added: switch to toogle between candidate suggestion and voting
-- added: suport for adding candidate names
-- added: method to save given candidate names
- ADDED: addingCandidates:
-- added: site to enter candidate suggestions
- ADDED: CandidateWrapper:
-- added: complete class to help with data transferation through th:object
- CHANGES: Category:
-- added: constructor with name parameter for logging purposes
- CHANGES: Candidate:
-- added: setters for class variables
- CHANGES: TableAction:
-- refactoring: moved method to vote and update vote status from VotingController to TableActions class
- CHANGES: Resources:
-- added: Files with data to feed to the tables
- ADDED: voteSuccessful:
-- added fallback html page
- REFACTORING: candidateAddingSuccessful:
-- renamed file
This commit is contained in:
33
src/main/resources/templates/addingCandidates.html
Normal file
33
src/main/resources/templates/addingCandidates.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Schlage für jede Kategorie eine/n Kandiadt/en vor:</h1>
|
||||
<form action="#" th:action="@{/saveCandidates}" th:object="${form}" method="post">
|
||||
<fieldset>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> Kategorie</th>
|
||||
<th> Kandidat/in</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="category, itemStat : ${categories}">
|
||||
<td th:text="${category.name}"></td>
|
||||
<td><input th:field="*{candidates[__${itemStat.index}__].name}" /></td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="submit" id="submitButton" th:value="Confirm"></button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user