 
 ;; -------------------------
 ;; Views
+(defn form-input [label input]
+  [:div {:class "form-group"}
+   [:label {:for (:id (second input))} label]
+   input])
+
 (defn display-loading []
   [:div [:h2 "Loading..."]])
 


(defn add-conference-page []
  (let [doc (atom {})]
    [:div
     [:h2 "Add conference"]
     [:div
      [forms/bind-fields conference-form-template doc]
      [:div [:button {:on-click #(create-conference doc)} "Create"]]]]))

(def add-rating-template
  [:div
   (form-input "Author" [:input {:type "text" :placeholder "author" :class "form-control" :field :text :id :author}])
   (form-input "Stars" [:input {:type "number" :placeholder "stars" :class "form-control" :min 1 :max 5 :field :range :id :stars}])
   (form-input "Comment" [:textarea {:placeholder "comment" :class "form-control" :rows "5" :field :textarea :id :comment}])])

(defn create-rating [form-data]
  (let [conference @displayed-conference]
