fix(ui): move save bar to end of edit page after alias and danger zone
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:
@@ -42,15 +42,13 @@ const person = $derived(data.person);
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/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">
|
<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">
|
<h2 class="mb-5 text-xs font-bold tracking-widest text-ink-3 uppercase">
|
||||||
{m.persons_section_details()}
|
{m.persons_section_details()}
|
||||||
</h2>
|
</h2>
|
||||||
<PersonEditForm person={person} />
|
<PersonEditForm person={person} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<PersonEditSaveBar discardHref="/persons/{person.id}" />
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<NameHistoryEditCard
|
<NameHistoryEditCard
|
||||||
@@ -61,4 +59,6 @@ const person = $derived(data.person);
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<PersonDangerZone person={person} form={form} />
|
<PersonDangerZone person={person} form={form} />
|
||||||
|
|
||||||
|
<PersonEditSaveBar discardHref="/persons/{person.id}" formId="person-edit-form" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { m } from '$lib/paraglide/messages.js';
|
import { m } from '$lib/paraglide/messages.js';
|
||||||
|
|
||||||
let { discardHref }: { discardHref: string } = $props();
|
let { discardHref, formId }: { discardHref: string; formId?: string } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Sticky full-bleed save bar -->
|
<!-- Sticky full-bleed save bar -->
|
||||||
@@ -13,6 +13,7 @@ let { discardHref }: { discardHref: string } = $props();
|
|||||||
</a>
|
</a>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
|
form={formId}
|
||||||
formaction="?/update"
|
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"
|
class="rounded bg-primary px-6 py-2 text-sm font-bold tracking-widest text-primary-fg uppercase transition-colors hover:bg-primary/80"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user