commit cd0a7de952f5db1e462d2e6463f1925fa5ca2c2f
parent 944656e5aa16ee393db753ff9e4277072cc221ea
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sun, 11 Jun 2023 22:07:17 -0700
cleanup
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go
@@ -4934,15 +4934,12 @@ func ChessGameFormHandler(c echo.Context) error {
out := cssReset
out += interceptors.ChessCSS
- out += `<form method="post" action="/chess/` + key + `">
-<table class="newBoard">`
+ out += fmt.Sprintf(`<form method="post" action="/chess/%s"><table class="newBoard">`, key)
for row := 0; row < 8; row++ {
out += "<tr>"
for col := 0; col < 8; col++ {
id := interceptors.GetID(row, col, isFlipped)
- out += `<td>`
- out += fmt.Sprintf(`<input name="sq_%d" id="sq_%d" type="checkbox" value="1" /><label for="sq_%d"></label>`, id, id, id)
- out += "</td>"
+ out += fmt.Sprintf(`<td><input name="sq_%d" id="sq_%d" type="checkbox" value="1" /><label for="sq_%d"></label></td>`, id, id, id)
}
out += "</tr>"
}