                      (page-team-idea id idea published)))
               (POST "/:id/idea" [id idea]
                     (let [id (toint id)]
+                      (info (str "idea posted: " idea))
                       (swap! teams assoc id idea) ; TODO notify visibly that the idea has been published; notify /teams page
                       (redirect (str "/team/" id "?published=true")))))
      (GET "/teams" []

  (page "Projector"
        (include-changepoll-js)
        [:h1 "The Gamification Challenge"]
        [:p "Your task is ..."]))

(defn page-projector-voting-ongoing []
  (page "Projector"

(defn page-team-idea [team-id idea published]
  "Form to submit name of team's gamification idea"
  (page
   "Idea"
   (when published
     [:p.text-success "Your idea has been published"])
   [:form {:action (str "/team/" team-id "/idea"), :method "post"}
    [:h1 (str "Publish team " team-id "'s gamification idea:")]
    [:br]
    (let [ideas ["Increase trashbin usage in parks." "Increase e-book reading platform usage." "Increase consumption of vegetables." "Increase motivation to try/learn new stuff."]]
      [:ul.unstyled
       (map (fn [id] [:li [:label.radio
                          [:input {:type "radio", :name "idea", :value id}]
                          " "
                          id]
                     [:br]])
            ideas)
       [:li
        [:label.radio
         [:input#custIdeaIn {:type "radio", :name "idea"}
          [:input {:type "text", :value idea,
                   :autofocus "true",
                   :placeholder "Your own idea",
                   :title "Describe your idea"
                   :onchange "document.getElementById('custIdeaIn').value=this.value;"}]]]]])
    [:button.btn {:type "submit"} "Publish"]]
   await-voting-html
   ))
