                             {:handler       add-session-handler
                              :error-handler (fn [] (print "error getting session data from server."))})}
        template-name])))
-
-(defonce getting-templates
-         (GET "templates" {:handler       #(session/put! :templates %)
-                           :error-handler #(print "error retrieving templates.")}))
 
 (defn generator-component []
   (let []

(ns movement.generator
  (:require-macros [cljs.core.async.macros :refer (go)])
  (:import [goog.events EventType])
  (:require
    [reagent.session :as session]

          [:div.pure-u-1-3.se
           [:div.pure-g
            [:label.pure-u.set-text {:on-click #(if (= @set-text "Set")
                                                 (let [elements (array-seq (.getElementById js/document (str "set-" id)))]
                                                   (doseq [e elements]
                                                     (set! (.-selected e) false))
                                                   (reset! set-text "Duration"))
                                                 (let [elements (array-seq (.getElementById js/document (str "duration-" id)))]
                                                   (doseq [e elements]
                                                     (set! (.-selected e) false))
                                                   (reset! set-text "Set")))
                                     :title "Change between set and duration"}
             @set-text]
            (let [txt @set-text]
              (case txt
                "Set" [:div.pure-u.set {:className " custom-select"}
                                     [:select {:className "set-select"
                                               :id (str "set-" id)
                                               :on-change #(let [x (.-value (.getElementById js/document (str "set-" id)))]
                                                            (print x))}
                                      [:option "-"]
                                      [:option 1]
                                      [:option 2]
                                      [:option 3]
                                      [:option 4]
                                      [:option 5]
                                      [:option 6]
                                      [:option 7]
                                      [:option 8]
                                      [:option 9]
                                      [:option 10]]]
                "Duration" [:div.pure-u.duration {:className " custom-select"}
                            [:select {:className "duration-select"
                                      :id (str "duration-" id)
                                      :on-change #(let [x (.-value (.getElementById js/document (str "duration-" id)))]
                                                   (print x))}
                             [:option "-"]
                             [:option "5 s"]
                             [:option "10 s"]
