mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-07 05:39:37 +00:00
Use a symfony form for login form
This allows us to reuse the global form renderings
This commit is contained in:
parent
30e3bc3153
commit
598cf3ed80
3 changed files with 101 additions and 42 deletions
|
|
@ -25,6 +25,7 @@ namespace App\Controller;
|
|||
use App\Entity\UserSystem\User;
|
||||
use App\Events\SecurityEvent;
|
||||
use App\Events\SecurityEvents;
|
||||
use App\Form\Security\LoginFormType;
|
||||
use App\Services\UserSystem\PasswordResetManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Gregwar\CaptchaBundle\Type\CaptchaType;
|
||||
|
|
@ -61,7 +62,12 @@ class SecurityController extends AbstractController
|
|||
// last username entered by the user
|
||||
$lastUsername = $authenticationUtils->getLastUsername();
|
||||
|
||||
$form = $this->createForm(LoginFormType::class, [
|
||||
'_username' => $lastUsername,
|
||||
]);
|
||||
|
||||
return $this->render('security/login.html.twig', [
|
||||
'form' => $form,
|
||||
'last_username' => $lastUsername,
|
||||
'error' => $error,
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue