   [:div.form-group 
    [:div.row
     [:div.col-md-12
+     [:div.p (str "Preview: " (or @edit-tea-snap "*no tea selected*") " -> " (or @edit-tea "*no tea selected*"))]
      [:form 
       [:input.form-control {:field :text :id :change-tea :value @edit-tea :on-change #(reset! edit-tea (-> % .-target .-value))}]
-      [:input {:type "submit" :value "Update Tea Name" :on-click #(update-tea @edit-tea-id @edit-tea)}]]
-     [:input {:type "button" :value "Delete this tea" :on-click #(delete-tea @edit-tea)}]]]])
+      [:input.btn.btn-info {:type "submit" :value "Update Tea Name" :on-click #((update-tea @edit-tea-id @edit-tea)
+                                                                                (reset! edit-tea nil)
+                                                                                (reset! edit-tea-snap nil))}]]
+     [:input.btn.btn-danger {:type "button" :value (str "Delete " @edit-tea-snap) :on-click #(delete-tea @edit-tea)}]]]])
 
 ;; this passes the value of the new tea atom into the post-to-teas-db function
 

          [:tr
           [:td [:li]]
           [:td (second tea)]
           [:td [:input {:type "button" :value "Edit" :on-click #(show-edit-form (first tea) (second tea))}]]])]]]]))

(defn post-to-teas-db
  "Sends an Ajax Request to the API route to post the tea from the form to the database"

(def new-tea (atom nil))
(def edit-tea-id (reagent/atom nil))
(def edit-tea (reagent/atom nil))
(def edit-tea-snap (reagent/atom nil))
(def show-edit (reagent/atom false))

(defn get-teas [] (ajax/GET "/api/teas" :handler (fn [response] (reset! teas-list response))))
