EV3-413 Kilépéskor azonos login oldara írányítás
This commit is contained in:
parent
af90aa63b7
commit
2bbec051e3
37
app/Filament/Auth/Login.php
Normal file
37
app/Filament/Auth/Login.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Auth;
|
||||||
|
|
||||||
|
use Filament\Schemas\Components\Component;
|
||||||
|
use Filament\Forms\Components\TextInput;
|
||||||
|
use Filament\Auth\Pages\Login as BaseLogin;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
use SensitiveParameter;
|
||||||
|
|
||||||
|
class Login extends BaseLogin
|
||||||
|
{
|
||||||
|
protected function getEmailFormComponent(): Component
|
||||||
|
{
|
||||||
|
return TextInput::make('name')
|
||||||
|
->label('Felhasználónév')
|
||||||
|
->required()
|
||||||
|
->autocomplete()
|
||||||
|
->autofocus()
|
||||||
|
->extraInputAttributes(['tabindex' => 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getCredentialsFromFormData(#[SensitiveParameter] array $data): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => $data['name'],
|
||||||
|
'password' => $data['password'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function throwFailureValidationException(): never
|
||||||
|
{
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'data.name' => __('filament-panels::auth/pages/login.messages.failed'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user