            (get-items account items date-range)))
        notify/danger))))
 
+(def ^:private trx-form
+  [:form
+   (text-input :transaction-date :required)
+   (text-input :description :required)
+   (number-input :quantity :required)
+   (typeahead-input
+     :other-account-id
+     {:data-source accounts-source
+      :input-placeholder "Select the other account"
+      :in-fn (model-in-fn *accounts* :path)
+      :out-fn second
+      :result-fn first})])
+
+(defn- transaction-form []
+  (when @working-transaction
+    [:div.panel.panel-primary
+     [:div.panel-heading
+      [:h2.panel-title (if (:id @working-transaction)
+                         "Edit Transaction"
+                         "New Transaction")]]]
+    [bind-fields trx-form working-transaction]))
+
 (defn- show-account [id]
   (let [account (r/atom {})
         transaction-items (r/atom nil)]

(ns clj-money.views.accounts
  (:require-macros [cljs.core.async.macros :refer [go go-loop]])
  (:require [cljs.core.async :refer [<! >! chan]]
            [reagent.core :as r]
            [reagent-forms.core :refer [bind-fields]]
            [reagent.format :refer [currency-format]]

            [clj-money.x-platform.util :refer [desc-periodic-seq]]
            [clj-money.util :as util]
            [clj-money.forms :refer [text-input
                                     number-input
                                     select-input
                                     typeahead-input
                                     required]]))

(def ^:private *accounts* (r/atom []))
(def ^:private *commodities* (r/atom []))
(def ^:private working-transaction (r/atom nil))

(defn- delete
  [account]
