                                   :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))

                                                          :name method-name
                                                          :snapshotId new-snapshot-id})
       (endpoints/call-ajax-orch
         {:endpoint endpoints/create-template
          :payload method-ref
          :headers utils/content-type=json
          :on-done (fn [{:keys [success? get-parsed-response]}]
                     (let [response (get-parsed-response)]
                       (if success?
                         (endpoints/call-ajax-orch
                           {:endpoint endpoints/get-inputs-outputs
                            :payload (:methodRepoMethod response)
                            :headers utils/content-type=json
                            :on-done (fn [{:keys [success? get-parsed-response]}]
                                       (swap! state dissoc :blocker :wdl-parse-error)
                                       (let [template {:methodConfiguration (merge response config-namespace+name)}]
                                         (if success?
                                           (swap! state assoc
                                                  :loaded-config (assoc template
                                                                   :invalidInputs {}
                                                                   :validInputs {}
                                                                   :invalidOutputs {}
                                                                   :validOutputs {})
                                                  :inputs-outputs (get-parsed-response)
                                                  :redacted? false)
                                           (swap! state assoc :error (:message (get-parsed-response))))))})
                         (do
                           (swap! state assoc :redacted? true :blocker nil :wdl-parse-error (:message response))
                           (comps/push-error (style/create-server-error-message (:message response)))))))})))})
