improvements

This commit is contained in:
2023-10-22 21:00:04 -07:00
parent a6032e2be2
commit fc0392a235
9 changed files with 179 additions and 74 deletions

View File

@@ -193,7 +193,7 @@
[(com/button {:hx-get (str (bidi/path-for ssr-routes/only-routes
:admin-transaction-rule-new-dialog))
:hx-target "#modal-content"
:hx-swap "outerHTML"
:hx-swap "innerHTML"
:color :primary}
"New Transaction Rule")])
:row-buttons (fn [request entity]
@@ -201,7 +201,7 @@
:admin-transaction-rule-edit-dialog
:db/id (:db/id entity)))
:hx-target "#modal-content"
:hx-swap "outerHTML"}
:hx-swap "innerHTML"}
svg/pencil)])
:breadcrumbs [[:a {:href (bidi/path-for ssr-routes/only-routes
:admin)}
@@ -581,10 +581,7 @@
[:div#form-errors (when (:errors fc/*form-errors*)
[:span.error-content
(com/errors {:errors (:errors fc/*form-errors*)})])]])]
[:div (com/button {:color :primary :form "edit-form" :type "submit" :class (cond-> "w-32"
(seq form-errors) (->
(hh/add-class "animate-shake")))}
"Save")])]))
(com/validated-save-button {:errors form-errors} "Save rule"))]))
;; TODO Should forms have some kind of helper to render an individual field? saving