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>
73 lines
2.7 KiB
PHP
73 lines
2.7 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Validation\ValidationException;
|
|
use Livewire\Attributes\Layout;
|
|
use Livewire\Volt\Component;
|
|
|
|
new #[Layout('components.layouts.auth.pressekonto', ['heading' => 'Passwort bestätigen', 'eyebrow' => 'Sicherheitsbereich', 'showFromBanner' => false])] class extends Component {
|
|
public string $password = '';
|
|
|
|
/**
|
|
* Confirm the current user's password.
|
|
*/
|
|
public function confirmPassword(): void
|
|
{
|
|
$this->validate([
|
|
'password' => ['required', 'string'],
|
|
]);
|
|
|
|
if (! Auth::guard('web')->validate([
|
|
'email' => Auth::user()->email,
|
|
'password' => $this->password,
|
|
])) {
|
|
throw ValidationException::withMessages([
|
|
'password' => __('auth.password'),
|
|
]);
|
|
}
|
|
|
|
session(['auth.password_confirmed_at' => time()]);
|
|
|
|
$this->redirectIntended(default: route('dashboard', absolute: false), navigate: true);
|
|
}
|
|
}; ?>
|
|
|
|
<div>
|
|
<p class="text-[13.5px] text-ink-2 leading-[1.65] !-mt-4 mb-6">
|
|
{{ __('Dieser Bereich des Publisher-Hubs ist besonders geschützt. Bitte bestätigen Sie zur Sicherheit erneut Ihr Passwort, bevor Sie fortfahren.') }}
|
|
</p>
|
|
|
|
<form wire:submit="confirmPassword" class="space-y-[18px]" x-data="{ showPassword: false }" novalidate>
|
|
|
|
<div>
|
|
<label class="field-label" for="auth-password">{{ __('Passwort') }}</label>
|
|
<div class="field-pw-wrap">
|
|
<input
|
|
id="auth-password"
|
|
wire:model="password"
|
|
:type="showPassword ? 'text' : 'password'"
|
|
required
|
|
autofocus
|
|
autocomplete="current-password"
|
|
class="field-input pr-[72px]"
|
|
placeholder="••••••••••"
|
|
@error('password') aria-invalid="true" @enderror
|
|
/>
|
|
<button
|
|
type="button"
|
|
class="field-affix"
|
|
@click="showPassword = !showPassword"
|
|
x-text="showPassword ? '{{ __('Verbergen') }}' : '{{ __('Anzeigen') }}'"
|
|
>{{ __('Anzeigen') }}</button>
|
|
</div>
|
|
@error('password')
|
|
<p class="field-error">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<button type="submit" class="auth-btn-primary !mt-[22px]" wire:loading.attr="disabled" wire:target="confirmPassword">
|
|
<span wire:loading.remove wire:target="confirmPassword">{{ __('Bestätigen') }}</span>
|
|
<span wire:loading wire:target="confirmPassword">{{ __('Wird geprüft …') }}</span>
|
|
</button>
|
|
</form>
|
|
</div>
|