:)
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<div class="vote-form" id="vote-form-{{.Story.ID}}">
|
||||
{{$userVote := .UserVote}}
|
||||
{{$roomID := .RoomID}}
|
||||
{{$storyID := .Story.ID}}
|
||||
{{$userVote := .UserVote}} {{$roomID := .RoomID}} {{$storyID := .Story.ID}}
|
||||
<div class="vote-form" id="vote-form-{{$storyID}}">
|
||||
{{range scaleToOptions .Scale}}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
hx-post="/rooms/{{$roomID}}/vote"
|
||||
hx-target="#vote-form-{{$storyID}}"
|
||||
hx-swap="outerHTML"
|
||||
hx-vals='{"story_id":"{{$storyID}}","value":"{{.}}"}'
|
||||
class="vote-option {{if eq . $userVote}}vote-selected{{end}}">{{.}}</button>
|
||||
class="vote-option {{if eq . $userVote}}vote-selected{{end}}"
|
||||
>
|
||||
{{.}}
|
||||
</button>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user