stacked radios

This commit is contained in:
2023-10-20 13:56:59 -07:00
parent c0db7eb763
commit 8684a68471
3 changed files with 29 additions and 6 deletions

View File

@@ -546,7 +546,8 @@
:errors (fc/field-errors)}
(com/radio {:options (ref->radio-options "transaction-approval-status")
:value (fc/field-value)
:name (fc/field-name)})))
:name (fc/field-name)
:orientation :horizontal})))
[:div#form-errors [:span.error-content
(com/errors {:errors (:errors fc/*form-errors*)})]]
@@ -554,6 +555,12 @@
"Save")])]]
[:div])))
;; TODO Should forms have some kind of helper to render an individual field? saving
;; could generate the entire form and swap if there are errors
;; but also when you tab out it could call the same function, and just
;; pull out the single field to swap
(defn new-account [{{:keys [client-id index]} :query-params}]
(let [index (or index 0) ;; TODO schema decode is not working
transaction-rule {:transaction-rule/client (dc/pull (dc/db conn) '[:client/name :client/locations :db/id]