gui: Implement clickable level stars
parent
31e822b96e
commit
d077f6a10c
|
@ -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'"
|
||||
>
|
||||
★
|
||||
<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"
|
||||
>
|
||||
★
|
||||
</button>
|
||||
</form>
|
||||
</span>
|
||||
</span>
|
||||
<form
|
||||
|
|
Loading…
Reference in New Issue