does not change now.

This commit is contained in:
2023-10-21 12:43:01 -07:00
parent aa14a310ab
commit fc3634c6bd
4 changed files with 103 additions and 184 deletions

View File

@@ -424,7 +424,7 @@
[:fieldset {:class "hx-disable" :hx-disinherit "hx-target"}
(fc/start-form entity form-errors
[:div.space-y-2
[:div.space-y-1
(when-let [id (:db/id entity)]
(com/hidden {:name "db/id"
:value id}))
@@ -551,8 +551,9 @@
:name (fc/field-name)
:orientation :horizontal})))
[:div#form-errors [:span.error-content
(com/errors {:errors (:errors fc/*form-errors*)})]]
[:div#form-errors (when (:errors fc/*form-errors*)
[:span.error-content
(com/errors {:errors (:errors fc/*form-errors*)})])]
(com/button {:color :primary :form "edit-form" :type "submit" :class "w-32"}
"Save")])]]
[:div])))
@@ -611,7 +612,7 @@
(html-response (dialog* :entity entity
:form-params {:hx-put (str (bidi/path-for ssr-routes/only-routes
:admin-transaction-rule-edit-save))})
:headers {"hx-trigger" "modalopen"})))
:headers {"hx-trigger-after-settle" "modalopen"})))
(defn transaction-rule-error [request]
(let [entity (some-> request :last-form)]
@@ -631,7 +632,7 @@
:form-errors {}
:form-params {:hx-post (str (bidi/path-for ssr-routes/only-routes
:admin-transaction-rule-edit-save))})
:headers {"hx-trigger" "modalopen"}))
:headers {"hx-trigger-after-settle" "modalopen"}))
(def transaction-rule-schema (mc/schema
[:map