Die Auth-Strecke (Login, Registrierung, Passwort-Reset/-Bestaetigung, Magic-Link, E-Mail-Verifizierung, 2FA) war als einziger Backend-Bereich noch nicht durchgaengig __()-gewrappt. Alle sichtbaren deutschen Strings in __() gewickelt (Deutsch bleibt Schluessel). Eingebettete Links (AGB/ Datenschutz) und Alpine-x-text sauber segmentiert. Heading/Eyebrow und topRight-Label/-Link sowie der From-Banner werden jetzt im Auth-Layout am Ausgabepunkt uebersetzt (im #[Layout]-Attribut sind keine __()-Aufrufe moeglich). Leeres lang/en.json als Geruest fuer die spaetere EN-Befuellung. Kunden-, Admin-, Settings- und Component-Views waren bereits vollstaendig gewrappt (per Audit bestaetigt). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
65 lines
2.4 KiB
PHP
65 lines
2.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Password;
|
|
use Livewire\Attributes\Layout;
|
|
use Livewire\Volt\Component;
|
|
|
|
new #[Layout('components.layouts.auth.pressekonto', ['heading' => 'Passwort vergessen', 'eyebrow' => 'Passwort zurücksetzen', 'topRightLabel' => 'Doch erinnert?', 'topRightLinkText' => 'Zur Anmeldung', 'topRightLinkHref' => '/login'])] class extends Component {
|
|
public string $email = '';
|
|
|
|
/**
|
|
* Send a password reset link to the provided email address.
|
|
*/
|
|
public function sendPasswordResetLink(): void
|
|
{
|
|
$this->validate([
|
|
'email' => ['required', 'string', 'email'],
|
|
]);
|
|
|
|
Password::sendResetLink($this->only('email'));
|
|
|
|
session()->flash('status', __('A reset link will be sent if the account exists.'));
|
|
}
|
|
}; ?>
|
|
|
|
<div>
|
|
<p class="text-[13.5px] text-ink-2 leading-[1.6] !-mt-4 mb-6">
|
|
{{ __('Geben Sie die E-Mail-Adresse Ihres Kontos ein. Sie erhalten innerhalb weniger Minuten einen Link, mit dem Sie ein neues Passwort vergeben können.') }}
|
|
</p>
|
|
|
|
@if (session('status'))
|
|
<div class="field-status mb-4" role="status">
|
|
{{ session('status') }}
|
|
</div>
|
|
@endif
|
|
|
|
<form wire:submit="sendPasswordResetLink" class="space-y-[18px]" novalidate>
|
|
|
|
<div>
|
|
<label class="field-label" for="auth-email">{{ __('E-Mail-Adresse') }}</label>
|
|
<input
|
|
id="auth-email"
|
|
type="email"
|
|
wire:model="email"
|
|
required
|
|
autofocus
|
|
autocomplete="username"
|
|
class="field-input"
|
|
placeholder="redaktion@ihr-unternehmen.de"
|
|
@error('email') aria-invalid="true" @enderror
|
|
/>
|
|
@error('email')
|
|
<p class="field-error">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<button type="submit" class="auth-btn-primary !mt-[22px]" wire:loading.attr="disabled" wire:target="sendPasswordResetLink">
|
|
<span wire:loading.remove wire:target="sendPasswordResetLink">{{ __('Reset-Link senden') }}</span>
|
|
<span wire:loading wire:target="sendPasswordResetLink">{{ __('Link wird gesendet …') }}</span>
|
|
</button>
|
|
|
|
<div class="flex items-center justify-center pt-2 text-[12.5px] text-ink-3">
|
|
<a href="{{ route('login') }}" class="link-hub" wire:navigate>← {{ __('Zurück zur Anmeldung') }}</a>
|
|
</div>
|
|
</form>
|
|
</div>
|