diff --git a/assets/styles/utilities/dsfr-extensions/sizing.css b/assets/styles/utilities/dsfr-extensions/sizing.css
index 7fa07d1d6..df887d910 100644
--- a/assets/styles/utilities/dsfr-extensions/sizing.css
+++ b/assets/styles/utilities/dsfr-extensions/sizing.css
@@ -6,6 +6,10 @@
max-width: calc(37 * 0.5rem);
}
+.fr-x-max-w-38w {
+ max-width: calc(38 * 0.5rem);
+}
+
.fr-x-max-w-156w {
max-width: calc(156 * 0.5rem);
}
diff --git a/src/Domain/Condition/VehicleSet.php b/src/Domain/Condition/VehicleSet.php
index b35953380..7f920417f 100644
--- a/src/Domain/Condition/VehicleSet.php
+++ b/src/Domain/Condition/VehicleSet.php
@@ -8,8 +8,6 @@
class VehicleSet
{
- public const DEFAULT_MAX_WEIGHT = 3.5;
-
public function __construct(
private string $uuid,
private Measure $measure,
diff --git a/src/Infrastructure/Form/Regulation/VehicleSetFormType.php b/src/Infrastructure/Form/Regulation/VehicleSetFormType.php
index 4c97c4a10..16cbd64cb 100644
--- a/src/Infrastructure/Form/Regulation/VehicleSetFormType.php
+++ b/src/Infrastructure/Form/Regulation/VehicleSetFormType.php
@@ -5,7 +5,6 @@
namespace App\Infrastructure\Form\Regulation;
use App\Application\Regulation\Command\VehicleSet\SaveVehicleSetCommand;
-use App\Domain\Condition\VehicleSet;
use App\Domain\Regulation\Enum\CritairEnum;
use App\Domain\Regulation\Enum\VehicleTypeEnum;
use Symfony\Component\Form\AbstractType;
@@ -42,12 +41,20 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
)
->add(
'heavyweightMaxWeight',
- NumberType::class,
- options: [
+ ChoiceType::class,
+ options : [
+ 'choices' => [
+ 3.5 => 3.5,
+ 7.5 => 7.5,
+ 19 => 19,
+ 26 => 26,
+ 32 => 32,
+ 44 => 44,
+ ],
'label' => 'regulation.vehicle_set.heavyweightMaxWeight',
+ 'placeholder' => 'regulation.vehicle_set.heavyweightMaxWeight.placeholder',
'help' => 'regulation.vehicle_set.heavyweightMaxWeight.help',
'required' => false,
- 'empty_data' => '3,5',
],
)
->add(
@@ -121,15 +128,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
},
),
);
-
- $builder
- ->get('heavyweightMaxWeight')
- ->addModelTransformer(
- new CallbackTransformer(
- transform: fn ($maxWeight) => $maxWeight ?? VehicleSet::DEFAULT_MAX_WEIGHT,
- reverseTransform: fn ($value) => $value,
- ),
- );
}
private function getRestrictedTypesOptions(): array
diff --git a/templates/regulation/_vehicle_set_form.html.twig b/templates/regulation/_vehicle_set_form.html.twig
index 103788ef2..50f50e863 100644
--- a/templates/regulation/_vehicle_set_form.html.twig
+++ b/templates/regulation/_vehicle_set_form.html.twig
@@ -104,7 +104,7 @@