                                   :on-success (:on-submission-success props)})])
         (create-section-header "Method Configuration Name")
         (create-section
-         (if editing?
-           [:div {}
-            (style/create-text-field {:ref "confname" :style {:maxWidth 500}
-                                      :data-test-id "edit-method-config-name-input"
-                                      :defaultValue (:name config)
-                                      :onKeyDown (common/create-key-handler [:space] #(.preventDefault %))})
-            (style/create-textfield-hint input/hint-alphanumeric_-period)]
-           [:div {:style {:padding "0.5em 0 1em 0"}
-                  :data-test-id "method-config-name"} (:name config)]))
+          (if editing?
+            [:div {}
+             (style/create-text-field {:ref "confname" :style {:maxWidth 500}
+                                       :data-test-id "edit-method-config-name-input"
+                                       :defaultValue (:name config)
+                                       :onKeyDown (common/create-key-handler [:space] #(.preventDefault %))})
+             (style/create-textfield-hint input/hint-alphanumeric_-period)]
+            [:div {:style {:padding "0.5em 0 1em 0"}
+                   :data-test-id "method-config-name"} (:name config)]))
         (create-section-header "Referenced Method")
         (let [method (if (empty? methods-response)
                        {:name methodName :namespace methodNamespace :entityType "Workflow"}

(ns broadfcui.page.workspace.method-configs.method-config-editor
  (:require
   [dmohs.react :as react]
   [clojure.string :as string]
   [broadfcui.common :as common]
   [broadfcui.common.components :as comps]
   [broadfcui.common.method.config-io :refer [IOTables]]
   [broadfcui.common.style :as style]
   [broadfcui.components.buttons :as buttons]
   [broadfcui.components.entity-details :refer [EntityDetails]]
   [broadfcui.components.sticky :refer [Sticky]]
   [broadfcui.endpoints :as endpoints]
   [broadfcui.page.workspace.method-configs.delete-config :as delete]
   [broadfcui.page.workspace.method-configs.launch-analysis :as launch]
   [broadfcui.page.workspace.method-configs.publish :as publish]
   [broadfcui.page.workspace.method-configs.synchronize :as mc-sync]
   [broadfcui.page.workspace.workspace-common :as ws-common]
   [broadfcui.utils :as utils]
   [broadfcui.common.input :as input]
   ))

(defn- filter-empty [coll]
  (->> coll (map string/trim) (remove string/blank?) vec))

           selected-values ((@refs "IOTables") :save)]
       (swap! state assoc :blocker "Updating...")
       (endpoints/call-ajax-orch
         {:endpoint (endpoints/update-workspace-method-config workspace-id (ws-common/config->id config))
          :payload (merge config
                          selected-values
                          {:name name
                           :rootEntityType root-entity-type
                           :methodRepoMethod (merge (:methodRepoMethod config)
                                                    ((@refs "methodDetailsViewer") :get-fields))
                           :workspaceName workspace-id})
          :headers utils/content-type=json
          :on-done (fn [{:keys [success? get-parsed-response]}]
                     (swap! state dissoc :blocker :editing?)
                     (if success?
                       (do (swap! state dissoc :redacted?)
                           ((:on-rename props) name)
                           ((@refs "methodDetailsViewer") :clear-redacted-snapshot)
                           (swap! state assoc :loaded-config (get-parsed-response) :blocker nil))
                       (comps/push-error-response (get-parsed-response false))))})))
   :-load-validated-method-config
   (fn [{:keys [state props]}]
     (endpoints/call-ajax-orch
       {:endpoint (endpoints/get-validated-workspace-method-config (:workspace-id props) (:config-id props))
        :on-done (fn [{:keys [success? get-parsed-response status-text]}]
                   (if success?
                     (let [response (get-parsed-response)
                           fake-inputs-outputs (fn [data]
                                                 (let [method-config (:methodConfiguration data)]
                                                   {:inputs (mapv (fn [k] {:name (name k)}) (keys (:inputs method-config)))
                                                    :outputs (mapv (fn [k] {:name (name k)}) (keys (:outputs method-config)))}))]
                       (endpoints/call-ajax-orch
                         {:endpoint endpoints/get-inputs-outputs
                          :payload (get-in response [:methodConfiguration :methodRepoMethod])
                          :headers utils/content-type=json
                          :on-done (fn [{:keys [success? get-parsed-response]}]
                                     (if success?
                                       (swap! state assoc :loaded-config response :inputs-outputs (get-parsed-response) :redacted? false)
                                       (swap! state assoc :loaded-config response :inputs-outputs (fake-inputs-outputs response) :redacted? true)))}))
                     (swap! state assoc :error status-text)))}))
   :-load-new-method-template
   (fn [{:keys [state refs]} new-snapshot-id]
     (let [[method-namespace method-name] (map (fn [key]
