diff options
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/admin/handler.go | 2 | ||||
| -rw-r--r-- | backend/admin/templates/game_edit.html | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/backend/admin/handler.go b/backend/admin/handler.go index 7ab6ffc..3b8af23 100644 --- a/backend/admin/handler.go +++ b/backend/admin/handler.go @@ -219,7 +219,7 @@ func (h *Handler) postGameEdit(c echo.Context) error { } gameType := c.FormValue("game_type") - isPublic := c.FormValue("is_public") == "public" + isPublic := (c.FormValue("is_public") != "") displayName := c.FormValue("display_name") durationSeconds, err := strconv.Atoi(c.FormValue("duration_seconds")) if err != nil { diff --git a/backend/admin/templates/game_edit.html b/backend/admin/templates/game_edit.html index 3b9d9de..5ff2ddc 100644 --- a/backend/admin/templates/game_edit.html +++ b/backend/admin/templates/game_edit.html @@ -23,10 +23,7 @@ </div> <div> <label>Is Public</label> - <select name="is_public" required> - <option value="public"{{ if .Game.IsPublic }} selected{{ end }}>Public</option> - <option value="private"{{ if not .Game.IsPublic }} selected{{ end }}>Private</option> - </select> + <input type="checkbox" name="is_public"{{ if .Game.IsPublic }} checked{{ end }}> </div> <div> <label>Duration Seconds</label> |
