2022-07-21 16:15:47 +02:00
|
|
|
<?php
|
2022-09-23 16:14:15 +02:00
|
|
|
|
2022-07-21 16:15:47 +02:00
|
|
|
namespace App\Form;
|
|
|
|
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
|
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
2022-09-23 16:14:15 +02:00
|
|
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
2022-07-21 16:15:47 +02:00
|
|
|
|
|
|
|
class LoginType extends AbstractType
|
|
|
|
{
|
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
|
|
{
|
|
|
|
$builder->add('submit',
|
2022-09-23 16:14:15 +02:00
|
|
|
SubmitType::class, [
|
|
|
|
'label' => 'Valider',
|
|
|
|
'attr' => ['class' => 'btn btn-success mt-4 float-end'],
|
2022-07-21 16:15:47 +02:00
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
$builder->add('username',
|
2022-09-23 16:14:15 +02:00
|
|
|
TextType::class, [
|
|
|
|
'label' => 'Login',
|
|
|
|
'attr' => ['autocomplete' => 'new-password'],
|
2022-07-21 16:15:47 +02:00
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
$builder->add('password',
|
|
|
|
PasswordType::class, [
|
2022-09-23 16:14:15 +02:00
|
|
|
'always_empty' => true,
|
|
|
|
'label' => 'Mot de Passe',
|
|
|
|
'attr' => ['autocomplete' => 'new-password'],
|
2022-07-21 16:15:47 +02:00
|
|
|
]
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|