From a0926554fb78e88880dfe83b17fd33231e420132 Mon Sep 17 00:00:00 2001 From: Patrick Fairbank Date: Thu, 16 May 2024 16:56:22 -0700 Subject: [PATCH] Fix 'Edit Results' button. --- templates/edit_match_result.html | 3 ++- templates/match_play.html | 6 +++--- web/match_review.go | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/edit_match_result.html b/templates/edit_match_result.html index 2fd42256..cd139d4d 100644 --- a/templates/edit_match_result.html +++ b/templates/edit_match_result.html @@ -15,7 +15,8 @@
- +
diff --git a/templates/match_play.html b/templates/match_play.html index ef1e0c39..7c2d9307 100644 --- a/templates/match_play.html +++ b/templates/match_play.html @@ -72,10 +72,10 @@ onclick="$('#confirmDiscardResults').modal('show');" disabled> Discard Results - +
diff --git a/web/match_review.go b/web/match_review.go index e6cf9afe..185f0f1c 100644 --- a/web/match_review.go +++ b/web/match_review.go @@ -76,7 +76,7 @@ func (web *Web) matchReviewEditGetHandler(w http.ResponseWriter, r *http.Request return } - match, matchResult, _, err := web.getMatchResultFromRequest(r) + match, matchResult, isCurrent, err := web.getMatchResultFromRequest(r) if err != nil { handleWebErr(w, err) return @@ -96,8 +96,9 @@ func (web *Web) matchReviewEditGetHandler(w http.ResponseWriter, r *http.Request *model.EventSettings Match *model.Match MatchResultJson string + IsCurrentMatch bool Rules map[int]*game.Rule - }{web.arena.EventSettings, match, string(matchResultJson), game.GetAllRules()} + }{web.arena.EventSettings, match, string(matchResultJson), isCurrent, game.GetAllRules()} err = template.ExecuteTemplate(w, "base", data) if err != nil { handleWebErr(w, err)