websocket checkboxes
This commit is contained in:
10
views/boxes.html
Normal file
10
views/boxes.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{block "boxes" .}}
|
||||
{{range $index, $value := .}}
|
||||
<input type="checkbox" id="box-{{$index}}" name="checked" {{if $value}}checked{{end}}
|
||||
hx-post="/box/{{$index}}"
|
||||
hx-vals='{"value": this.checked}'
|
||||
hx-trigger="change"
|
||||
hx-encoding="none"
|
||||
>
|
||||
{{end}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user