               :template (:email-template data-pack)
               :library (:artifact-value data-pack)}]
     (if (s/check schm/EmailAction data)
-      (msg/danger "Data is wrong! Check out it please.")
+      (msg/danger default-error-message)
       (do
         (.modal ($ :#iModalAddAction) "hide")
         (ajax "/api/actions" "POST" data 

(defn ^:export update-project [project-id new-name]
  (let [data {:name new-name}]
    (if (s/check schm/Project data)
      (msg/danger "Data is wrong! Check out it please.")
      (do
        (.modal ($ :#iModalProjectMenu) "hide")
        (ajax

            [hatnik.schema :as schm]
            [schema.core :as s])
  (:use [jayq.core :only [$]]))

(def default-error-message "Data is wrong! Check out highlighted fields please.")

(defn get-data-from-input [id]
  (.-value (.getElementById js/document id)))
