gui: Implement clickable level stars

pull/1/head
Lunix-420 2024-11-04 15:20:19 +01:00
parent 31e822b96e
commit d077f6a10c
1 changed files with 24 additions and 5 deletions

View File

@ -49,11 +49,30 @@
>Secondary Skill</span
>
<span class="stars">
<span
th:each="i : ${#numbers.sequence(1, 5)}"
th:classappend="${i <= pair.second} ? 'star-filled' : 'star-empty'"
>
&#9733;
<span th:each="i : ${#numbers.sequence(1, 5)}">
<form
th:action="@{/skills/update-level}"
method="post"
class="d-inline"
>
<input
type="hidden"
name="skillId"
th:value="${pair.first.ssid}"
/>
<input
type="hidden"
name="level"
th:value="${i}"
/>
<button
type="submit"
th:classappend="${i <= pair.second} ? 'star-filled' : 'star-empty'"
class="star"
>
&#9733;
</button>
</form>
</span>
</span>
<form