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