                                        (dom/i #js {:className "fa fa-comment"}))
                              (dom/input #js {:id        (lib/prefix-name "add-element")
                                              :className "form-control"
-                                             :onChange  #(lib/update-state-item! :user :statement (fn [_] (-> % .-target .-value)))}))
+                                             :onChange  #(om/transact! :statement (fn [_] (-> % .-target .-value)))}))
                     (when (lib/get-selection)
                       (dom/div #js {:className "input-group"}
                                (dom/span #js {:className "input-group-addon"}


(defn add-element
  "Show form to add a new statement."
  [data]
  (dom/div #js {:className "panel panel-default"}
           (dom/div #js {:className "panel-body"}
                    (dom/h4 #js {:className "text-center"} (get-in data [:layout :add-text]))

                                 (= view :login) (login-form)
                                 :else (discussion-elements data)))))
           (when (get-in data [:layout :add?])
             (add-element data owner))))

(defn main-view [data owner]
  (reify om/IRender
    (render [_]
      (dom/div #js {:id (lib/prefix-name "dialogue-main")}
