Skip to content

Commit ebb8355

Browse files
garrappachcclaude
andcommitted
fix(queue-captain): always send wantsCaptain value on toggle change
Unchecked HTML checkboxes are excluded from form serialization, so untoggling the captain wish never sent the wantsCaptain value via ws-send. Switch to hx-vals so the value is always included. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bbf252b commit ebb8355

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/queue-captain/views/html/wants-captain-toggle.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ export async function WantsCaptainToggle(props: { actor?: SteamId64 | undefined
1818
<label id="wants-captain-toggle" class="wants-captain-toggle" ws-send>
1919
<input
2020
type="checkbox"
21-
name="wantsCaptain"
22-
value={player.wantsCaptain ? 'false' : 'true'}
2321
checked={player.wantsCaptain}
2422
ws-send
2523
hx-trigger="change"
24+
hx-vals={JSON.stringify({ wantsCaptain: player.wantsCaptain ? 'false' : 'true' })}
2625
data-umami-event="captain-toggle"
2726
/>
2827
<IconCrown size={18} />

0 commit comments

Comments
 (0)