|
|
@ -5,9 +5,6 @@
|
|
|
|
[hiccup.core :as hcore]
|
|
|
|
[hiccup.core :as hcore]
|
|
|
|
[ring.util.anti-forgery :refer [anti-forgery-field]]))
|
|
|
|
[ring.util.anti-forgery :refer [anti-forgery-field]]))
|
|
|
|
|
|
|
|
|
|
|
|
(defn in? [coll x]
|
|
|
|
|
|
|
|
(some? (some (partial = x) coll)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(spec/def ::label string?)
|
|
|
|
(spec/def ::label string?)
|
|
|
|
(spec/def ::required boolean?)
|
|
|
|
(spec/def ::required boolean?)
|
|
|
|
(spec/def ::spec
|
|
|
|
(spec/def ::spec
|
|
|
@ -18,8 +15,7 @@
|
|
|
|
:options (spec/coll-of (spec/tuple string? string?))))
|
|
|
|
:options (spec/coll-of (spec/tuple string? string?))))
|
|
|
|
(spec/def ::widget
|
|
|
|
(spec/def ::widget
|
|
|
|
#{:input :select :checkbox :textarea :mselect :hidden})
|
|
|
|
#{:input :select :checkbox :textarea :mselect :hidden})
|
|
|
|
(spec/def ::from-req
|
|
|
|
(spec/def ::from-req ifn?)
|
|
|
|
(spec/and ifn? #_(= 1 (->> % meta :arglists (map count) first))))
|
|
|
|
|
|
|
|
(spec/def ::to-form ::from-req)
|
|
|
|
(spec/def ::to-form ::from-req)
|
|
|
|
(spec/def ::field
|
|
|
|
(spec/def ::field
|
|
|
|
(spec/keys :opt-un [::label
|
|
|
|
(spec/keys :opt-un [::label
|
|
|
|