            (om/build-all project-row (sort-by :project_id
                                               (mapv #(assoc % :role (get-in existing-selections [(:project_id %)] "none"))
                                                     projects))
-                         {:key :project_id :opts {:dropdown-chan dropdown-chan}})]]]]))))
+                         {:key :project_id :opts {:event-chan event-chan}})]]]]))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Programmes
 
-(defn programmes-row [programme owner {:keys [dropdown-chan]}]
+(defn programmes-row [programme owner {:keys [event-chan]}]
   (reify
     om/IRender
     (render [_]

          [:td {:style {:width "40%"}}
          (om/build dropdown {:default role
                              :items programmes-table-roles}
                    {:opts {:dropdown-chan dropdown-chan
                            :id (str programme_id "-role")
                            :path [:programmes programme_id]}})]])))))

(defn programmes-table [{:keys [programmes existing-selections]} owner {:keys [dropdown-chan]}]
  (reify
    om/IRender
    (render [_]


(defn post-form [data username selected]
  (let [{:keys [role programmes projects]} selected]
    (let [existing-data (dissoc (-> @data :user) :class :username :data :fetching :typed)
          selected-role (:role selected)
          new-data      (-> (into {} (filter #(seq (val %)) (select-keys selected [:programmes :projects])))
                            (cond-> (seq role) (assoc :role role)))
          data-to-post  (common/deep-merge existing-data new-data)
          parsed (-> data-to-post
                     (assoc :programmes (into {} (remove #(nil? (val %)) (:programmes data-to-post))))
