All fallbacks added to the login site. Edited voting.html
.gitignore:
- added the /logs folder to the gitignore
VotingController.java:
- added log message logging false entry format
Candidate.java:
- return type changed from 'String' to 'Candidate'
wrongEmail.html:
- added html file to avoid error
voting.html:
- changed the way of output
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -31,3 +31,4 @@ build/
|
|||||||
|
|
||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
*.log
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class VotingController {
|
|||||||
return "errors/notRegistered.html";
|
return "errors/notRegistered.html";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOGGER.error("Wrong input format detected: " + name);
|
||||||
return "errors/wrongEmail.html";
|
return "errors/wrongEmail.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,5 +40,5 @@ public class Candidate {
|
|||||||
return votes;
|
return votes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCategory() {return category.getName();}
|
public Category getCategory() {return category;}
|
||||||
}
|
}
|
||||||
|
|||||||
0
src/main/resources/templates/errors/wrongEmail.html
Normal file
0
src/main/resources/templates/errors/wrongEmail.html
Normal file
@@ -10,13 +10,13 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>Wähle deine Kandidaten:</h1>
|
<h1>Wähle deine Kandidaten:</h1>
|
||||||
|
|
||||||
<div th:each="candidate: ${candidates}">
|
<div th:each="candidate : ${candidates}" class="candidates">
|
||||||
<p th:text="${candidate.id}"></p>
|
<h2 th:text="${candidate.category.name}"></h2>
|
||||||
<p th:text="${candidate.name}"></p>
|
<ul>
|
||||||
<p th:text="${candidate.votes}"></p>
|
<li th:text="${candidate.name}"></li>
|
||||||
<p th:text="${candidate.category}"></p>
|
<li th:text="${candidate.votes}"></li>
|
||||||
<!-- <input type="checkbox" id="${candidate.id}" name="${candidate.name}" unchecked>
|
<li th:text="${candidate.category.id}"></li>
|
||||||
<label for="${candidate.id}" th:text="${candidate.name}"></label> -->
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user