Commit fc3f1498 authored by Mat's avatar Mat
Browse files

formulaire type number pour les floats, pas integer

parent 7dffa1aa
......@@ -5,7 +5,7 @@ namespace PotageBundle\Form\Legume;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
......@@ -50,21 +50,21 @@ class LegumeType extends AbstractType
'class' => 'form-control form-control-sm',
),
));
$builder->add('quantiteMin', IntegerType::class, array(
$builder->add('quantiteMin', NumberType::class, array(
'label' => "Quantité minimale",
'label_attr' => array('class' => 'col-sm-4 col-form-label'),
'attr' => array(
'class' => 'form-control form-control-sm',
),
));
$builder->add('quantiteMax', IntegerType::class, array(
$builder->add('quantiteMax', NumberType::class, array(
'label' => "Quantité maximale",
'label_attr' => array('class' => 'col-sm-4 col-form-label'),
'attr' => array(
'class' => 'form-control form-control-sm',
),
));
$builder->add('quantiteStep', IntegerType::class, array(
$builder->add('quantiteStep', NumberType::class, array(
'label' => "Écart (step)",
'label_attr' => array('class' => 'col-sm-4 col-form-label'),
'attr' => array(
......
......@@ -59,7 +59,7 @@
<td>{{ legume.quantiteMin }}</td>
<td>{{ legume.quantiteMax }}</td>
<td>{{ legume.quantiteStep }}</td>
<td>{{ legume.prixUnitaire }}</td>
<td>{{ legume.prixUnitaire }} €/{{ legume.unite }}</td>
<td>
<a class="btn btn-primary btn-sm" role="button" href="{{ path('potage_legume_update', {'id': legume.id }) }}">Editer</a>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment