38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
namespace App\Form;
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
|
|
|
class LoginType extends AbstractType
|
|
{
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
{
|
|
$builder->add('submit',
|
|
SubmitType::class,[
|
|
"label" => "Valider",
|
|
"attr" => ["class" => "btn btn-success mt-4 float-end"],
|
|
]
|
|
);
|
|
|
|
$builder->add('username',
|
|
TextType::class,[
|
|
"label" =>"Login",
|
|
"attr" => ["autocomplete" => "new-password"]
|
|
]
|
|
);
|
|
|
|
$builder->add('password',
|
|
PasswordType::class, [
|
|
"always_empty" => true,
|
|
"label" => "Mot de Passe",
|
|
"attr" => ["autocomplete" => "new-password"]
|
|
]
|
|
);
|
|
|
|
}
|
|
}
|