5.5: <x-password-input> + 6 Auth-Passwortfelder umgestellt
Self-contained Alpine-Toggle (Anzeigen/Verbergen) pro Feld; Props name/label/
autocomplete/placeholder/required/autofocus/show-error, id default auth-<name>,
Slot :labelAction fuer den 'Passwort vergessen?'-Link (login). Ersetzt die
field-pw-wrap-Bloecke in login, register (2), reset-password (2), confirm-
password (1). Die nun ungenutzten form-level x-data={showPassword...} entfernt.
Nebeneffekt/Bugfix: register+reset nutzten :placeholder="__(...)" auf rohem
<input> -> wurde als Alpine-Bind woertlich ausgegeben und schlug fehl (leerer
Platzhalter). Als Component-Prop wird __() korrekt in PHP aufgeloest, der
Hinweistext (z. B. 'Mindestens 8 Zeichen') erscheint jetzt.
Bestaetigungsfelder ohne Fehleranzeige (show-error=false, wie zuvor).
116 Auth-Tests gruen, alle Views kompilieren.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9e6f775e1b
commit
dbbf8a4487
5 changed files with 112 additions and 143 deletions
|
|
@ -70,7 +70,7 @@ new #[Layout('components.layouts.auth.pressekonto', ['heading' => 'Neues Passwor
|
|||
{{ __('Vergeben Sie ein neues Passwort für Ihr Konto. Mindestens 8 Zeichen, idealerweise eine Kombination aus Buchstaben, Zahlen und Sonderzeichen.') }}
|
||||
</p>
|
||||
|
||||
<form wire:submit="resetPassword" class="space-y-[18px]" x-data="{ showPassword: false, showPasswordConfirmation: false }" novalidate>
|
||||
<form wire:submit="resetPassword" class="space-y-[18px]" novalidate>
|
||||
|
||||
<div>
|
||||
<label class="field-label" for="auth-email">{{ __('E-Mail-Adresse') }}</label>
|
||||
|
|
@ -88,51 +88,20 @@ new #[Layout('components.layouts.auth.pressekonto', ['heading' => 'Neues Passwor
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="field-label" for="auth-password">{{ __('Neues Passwort') }}</label>
|
||||
<div class="field-pw-wrap">
|
||||
<input
|
||||
id="auth-password"
|
||||
wire:model="password"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
required
|
||||
autocomplete="new-password"
|
||||
class="field-input pr-[72px]"
|
||||
:placeholder="__('Mindestens 8 Zeichen')"
|
||||
@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>
|
||||
<x-password-input
|
||||
name="password"
|
||||
:label="__('Neues Passwort')"
|
||||
autocomplete="new-password"
|
||||
:placeholder="__('Mindestens 8 Zeichen')"
|
||||
/>
|
||||
|
||||
<div>
|
||||
<label class="field-label" for="auth-password-confirmation">{{ __('Passwort bestätigen') }}</label>
|
||||
<div class="field-pw-wrap">
|
||||
<input
|
||||
id="auth-password-confirmation"
|
||||
wire:model="password_confirmation"
|
||||
:type="showPasswordConfirmation ? 'text' : 'password'"
|
||||
required
|
||||
autocomplete="new-password"
|
||||
class="field-input pr-[72px]"
|
||||
:placeholder="__('Neues Passwort wiederholen')"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
class="field-affix"
|
||||
@click="showPasswordConfirmation = !showPasswordConfirmation"
|
||||
x-text="showPasswordConfirmation ? '{{ __('Verbergen') }}' : '{{ __('Anzeigen') }}'"
|
||||
>{{ __('Anzeigen') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<x-password-input
|
||||
name="password_confirmation"
|
||||
:label="__('Passwort bestätigen')"
|
||||
autocomplete="new-password"
|
||||
:placeholder="__('Neues Passwort wiederholen')"
|
||||
:show-error="false"
|
||||
/>
|
||||
|
||||
<button type="submit" class="auth-btn-primary !mt-[22px]" wire:loading.attr="disabled" wire:target="resetPassword">
|
||||
<span wire:loading.remove wire:target="resetPassword">{{ __('Passwort zurücksetzen') }}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue