Profil-Feinschliff: Pflicht-Badges, Fokus-Fix, Submit-Modal auf Switches

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-06-12 15:02:11 +00:00
parent afcca34f91
commit b7145512a7
3 changed files with 29 additions and 21 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View file

@ -81,20 +81,24 @@
</div>
@endif
{{-- Bestätigungen --}}
<div class="space-y-2">
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
<input type="checkbox" x-model="agb" class="mt-0.5" />
<span>{{ __('Der Inhalt entspricht den AGB und gesetzlichen Vorgaben.') }}</span>
</label>
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
<input type="checkbox" x-model="images" class="mt-0.5" />
<span>{{ __('Alle Bildrechte sind geklärt.') }}</span>
</label>
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
<input type="checkbox" x-model="contact" class="mt-0.5" />
<span>{{ __('Die Angaben zum Pressekontakt sind korrekt.') }}</span>
</label>
{{-- Bestätigungen Flux-Switches (Einheitlichkeit, 12.06.2026);
der Alpine-State steuert weiterhin den Bestätigen-Button. --}}
<div class="space-y-3">
<flux:switch
align="left"
x-on:change="agb = $event.target.checked"
:label="__('Der Inhalt entspricht den AGB und gesetzlichen Vorgaben.')"
/>
<flux:switch
align="left"
x-on:change="images = $event.target.checked"
:label="__('Alle Bildrechte sind geklärt.')"
/>
<flux:switch
align="left"
x-on:change="contact = $event.target.checked"
:label="__('Die Angaben zum Pressekontakt sind korrekt.')"
/>
</div>
<div class="flex justify-end gap-2">

View file

@ -249,6 +249,10 @@ new #[Layout('components.layouts.app'), Title('Mein Profil')] class extends Comp
);
}
// Fokus-Fix: Nach dem Speichern soll kein Eingabefeld den Fokus
// erhalten (Browser/Autofill springen sonst auf das erste Feld).
$this->dispatch('profile-saved');
session()->flash('profile-status', __('Profil gespeichert.'));
}
@ -287,7 +291,7 @@ new #[Layout('components.layouts.app'), Title('Mein Profil')] class extends Comp
}
}; ?>
<div class="space-y-8">
<div class="space-y-8" x-data x-on:profile-saved.window="setTimeout(() => document.activeElement?.blur(), 50)">
{{-- ============== PAGE HEADER ============== --}}
<header class="page-header">
<div class="min-w-0">
@ -337,7 +341,7 @@ new #[Layout('components.layouts.app'), Title('Mein Profil')] class extends Comp
{{ __('Ihre Kontaktdaten für Ansprache und Rückfragen — unabhängig von der Rechnungsadresse unten.') }}
</p>
<div class="grid gap-4 sm:grid-cols-2">
<flux:input wire:model="name" :label="__('Anzeigename')" required class="sm:col-span-2" />
<flux:input wire:model="name" :label="__('Anzeigename')" :badge="__('Pflicht')" required class="sm:col-span-2" />
<flux:select wire:model="salutationKey" :label="__('Anrede')">
@foreach ($salutations as $key => $label)
<option value="{{ $key }}">{{ $label }}</option>
@ -432,7 +436,7 @@ new #[Layout('components.layouts.app'), Title('Mein Profil')] class extends Comp
</flux:select>
<flux:input wire:model="billingCompany" :label="__('Firmenname (optional)')" />
<flux:input wire:model="billingFirstName" :label="__('Vorname')" />
<flux:input wire:model="billingLastName" :label="__('Nachname')" />
<flux:input wire:model="billingLastName" :label="__('Nachname')" :badge="__('Pflicht')" />
</div>
</div>
@ -441,11 +445,11 @@ new #[Layout('components.layouts.app'), Title('Mein Profil')] class extends Comp
{{ __('Anschrift') }}
</div>
<div class="grid gap-4 sm:grid-cols-2">
<flux:input wire:model="billingAddress1" :label="__('Straße und Hausnummer')" class="sm:col-span-2" />
<flux:input wire:model="billingAddress1" :label="__('Straße und Hausnummer')" :badge="__('Pflicht')" class="sm:col-span-2" />
<flux:input wire:model="billingAddress2" :label="__('Adresszusatz (optional)')" class="sm:col-span-2" />
<flux:input wire:model="billingPostalCode" :label="__('PLZ')" />
<flux:input wire:model="billingCity" :label="__('Ort')" />
<flux:select wire:model.live="billingCountryCode" :label="__('Land')" class="sm:col-span-2">
<flux:input wire:model="billingPostalCode" :label="__('PLZ')" :badge="__('Pflicht')" />
<flux:input wire:model="billingCity" :label="__('Ort')" :badge="__('Pflicht')" />
<flux:select wire:model.live="billingCountryCode" :label="__('Land')" :badge="__('Pflicht')" class="sm:col-span-2">
@foreach ($countries as $code => $name)
<option value="{{ $code }}">{{ $name }}</option>
@endforeach