fix(ssr): transaction rule wizard drops fields on Next

The EditModal step body wrapped all rule fields in a nested
<form id="my-form"> inside the wizard's own #wizard-form. By HTML
form-ownership rules those fields belonged to the inner form, so when
htmx serialized #wizard-form on Next, none of the step-params fields
were sent. The server saw an empty rule, reported "required" for
description/accounts, and re-rendered a blank wizard (losing input).

Replace the nested <form> with a plain <div>; the wizard form already
owns submission, so the inner form and its htmx attributes were
redundant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-16 14:58:36 -07:00
parent de2a1ab850
commit 11024b7b89

View File

@@ -656,13 +656,7 @@
linear-wizard this
:head "Transaction rule"
:body (mm/default-step-body {}
[:form#my-form {:hx-ext "response-targets"
:hx-target-400 "#form-errors .error-content"
:hx-indicator "#submit"
:x-trap "true"
(if (:db/id (fc/field-value))
:hx-put
:hx-post) (str (bidi/path-for ssr-routes/only-routes ::route/save))}
[:div#my-form {:x-trap "true"}
[:fieldset {:class "hx-disable"
:x-data (hx/json {:clientId (or (:db/id (:transaction-rule/client (fc/field-value)))
(:transaction-rule/client (fc/field-value)))})}