fix(ui): move save bar to end of edit page after alias and danger zone
Some checks failed
CI / Unit & Component Tests (push) Failing after 2s
CI / Backend Unit Tests (push) Failing after 1s
CI / Unit & Component Tests (pull_request) Failing after 1s
CI / Backend Unit Tests (pull_request) Failing after 1s

Uses HTML form attribute to associate the submit button with the
person-edit-form from outside the form tag. Page now reads:
Personendaten -> Namensverlauf -> Danger zone -> Save bar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-07 15:59:05 +02:00
parent f0eb3a76be
commit 0f5eebec29
2 changed files with 5 additions and 4 deletions

View File

@@ -42,15 +42,13 @@ const person = $derived(data.person);
</div>
{/if}
<form method="POST" use:enhance>
<form id="person-edit-form" method="POST" use:enhance>
<div class="rounded-sm border border-line bg-surface p-6 shadow-sm">
<h2 class="mb-5 text-xs font-bold tracking-widest text-ink-3 uppercase">
{m.persons_section_details()}
</h2>
<PersonEditForm person={person} />
</div>
<PersonEditSaveBar discardHref="/persons/{person.id}" />
</form>
<NameHistoryEditCard
@@ -61,4 +59,6 @@ const person = $derived(data.person);
/>
<PersonDangerZone person={person} form={form} />
<PersonEditSaveBar discardHref="/persons/{person.id}" formId="person-edit-form" />
</div>

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages.js';
let { discardHref }: { discardHref: string } = $props();
let { discardHref, formId }: { discardHref: string; formId?: string } = $props();
</script>
<!-- Sticky full-bleed save bar -->
@@ -13,6 +13,7 @@ let { discardHref }: { discardHref: string } = $props();
</a>
<button
type="submit"
form={formId}
formaction="?/update"
class="rounded bg-primary px-6 py-2 text-sm font-bold tracking-widest text-primary-fg uppercase transition-colors hover:bg-primary/80"
>