From 564fe33bb66a582844017aef568462083e79d6a9 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 6 Oct 2016 15:00:14 -0700 Subject: [PATCH] Add UI for explicit publishing match schedule to TBA --- setup_schedule.go | 4 ++++ templates/setup_schedule.html | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/setup_schedule.go b/setup_schedule.go index 8ac20f8..a0744c9 100644 --- a/setup_schedule.go +++ b/setup_schedule.go @@ -108,10 +108,14 @@ func ScheduleRepublishPostHandler(w http.ResponseWriter, r *http.Request) { http.Error(w, "Failed to publish matches: "+err.Error(), 500) return } + } else { + http.Error(w, "TBA publishing is not enabled", 500) + return } http.Redirect(w, r, "/setup/schedule", 302) } + // Saves the generated schedule to the database. func ScheduleSavePostHandler(w http.ResponseWriter, r *http.Request) { if !UserIsAdmin(w, r) { diff --git a/templates/setup_schedule.html b/templates/setup_schedule.html index 9effb63..cd638cb 100644 --- a/templates/setup_schedule.html +++ b/templates/setup_schedule.html @@ -53,6 +53,15 @@ + {{if .EventSettings.TbaPublishingEnabled}} +
+
+ +
+
+ {{end}} @@ -135,6 +144,27 @@ + + {{end}} {{define "script"}}