54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Form;
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
|
class AfnorType extends AbstractType
|
|
{
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
{
|
|
$builder->add('submit',
|
|
SubmitType::class, [
|
|
'label' => 'Valider',
|
|
'attr' => ['class' => 'btn btn-success mb-5'],
|
|
]
|
|
);
|
|
|
|
$builder->add('id',
|
|
TextType::class, [
|
|
'mapped' => false,
|
|
'label' => 'ID Déliverance',
|
|
'required' => true,
|
|
]
|
|
);
|
|
|
|
|
|
$builder->add('codeproduct',
|
|
TextType::class, [
|
|
'mapped' => false,
|
|
'label' => 'Code Produit',
|
|
'required' => true,
|
|
]
|
|
);
|
|
|
|
$builder->add('codequalifications', CollectionType::class, [
|
|
'entry_type' => TextType::class,
|
|
'label' => 'Codes Qualification',
|
|
'allow_add' => true,
|
|
'required' => false,
|
|
]);
|
|
}
|
|
|
|
public function configureOptions(OptionsResolver $resolver)
|
|
{
|
|
$resolver->setDefaults([
|
|
]);
|
|
}
|
|
}
|