                                "Invite Teammates")
                              (when show-modal?
                                (om/build invite-teammates-modal {:selected-org (select-keys selected-org [:name :vcs_type :vcs-users])
-                                                                 :close-fn #(om/set-state! owner :show-modal? false)
-                                                                 :app app}))]}
+                                                                 :close-fn #(om/set-state! owner :show-modal? false)}))]}
                 (if-let [users (:users selected-org)]
                   (table (add-follow-counts users (:projects selected-org)))
                   (html [:div.loading-spinner common/spinner])))

        (when-not (:vcs-users selected-org)
          (api/get-org-members (:name selected-org) (:vcs_type selected-org) (om/get-shared owner [:comms :api]))))

      om/IInitState
      (init-state [_]
        {:selected-members #{}
         :show-modal? false})

      om/IWillReceiveProps
      (will-receive-props [_ {new-vcs-users :vcs-users}]
        (let [{old-vcs-users :vcs-users} (om/get-props owner)]
          (when (not= new-vcs-users old-vcs-users)
            (om/set-state! :org-members-by-login (into {}
                                                       (map (fn [{:keys [email login]}]
                                                              [login {:email email
                                                                      :selected (utils/valid-email? email)}])
                                                            new-vcs-users))))))
      
      om/IRenderState
      (render-state [_ {:keys [show-modal? org-members-by-login] :as state}]

                                          (forms/managed-button
                                           [:button.btn.btn-success {:data-success-text "Sent"
                                                                     :on-click #(do
                                                                                  (raise! owner [:invited-github-users {:invitees (invitees org-members-by-login)
                                                                                                                        :vcs_type (:vcs_type selected-org)
                                                                                                                        :org-name (:name selected-org)}])
                                                                                  (close-fn))
                                                                     :disabled (or (empty? (invitees org-members-by-login))
                                                                                   (not (every? #(utils/valid-email? (:email %)) (invitees org-members-by-login))))}
                                            "Send Invites "
                                            [:i.fa.fa-envelope-o]])]
                                :close-fn close-fn})))))))
