diff --git a/src/Controller/User/Product/ObjectController.php b/src/Controller/User/Product/ObjectController.php index db8b52d..5da2808 100644 --- a/src/Controller/User/Product/ObjectController.php +++ b/src/Controller/User/Product/ObjectController.php @@ -61,7 +61,7 @@ final class ObjectController extends AbstractController return $this->redirectToRoute('app_product_show', $product->getRoutingParameters()); } - return $this->render('pages/product/new_object.html.twig', compact('form')); + return $this->render('pages/product/new_object.html.twig', compact('form', 'product')); } #[Route(path: [ diff --git a/src/Controller/User/Product/ServiceController.php b/src/Controller/User/Product/ServiceController.php index f5fbe9b..dad5958 100644 --- a/src/Controller/User/Product/ServiceController.php +++ b/src/Controller/User/Product/ServiceController.php @@ -66,7 +66,7 @@ final class ServiceController extends AbstractController return $this->redirectToRoute('app_product_show', $product->getRoutingParameters()); } - return $this->render('pages/product/new_service.html.twig', compact('form')); + return $this->render('pages/product/new_service.html.twig', compact('form', 'product')); } else { throw new GoneHttpException(); } diff --git a/templates/components/product/_address_form.html.twig b/templates/components/product/_address_form.html.twig index 0d1e669..afa1c1e 100644 --- a/templates/components/product/_address_form.html.twig +++ b/templates/components/product/_address_form.html.twig @@ -1,7 +1,7 @@ {% if app.user.address is not null %} {% include 'components/layout/_title_5.html.twig' with { rowClass: 'border-top', - title: 'product.form.recover'|trans, + title: product.type.value == "object" ? 'product.form.recover'|trans : 'product.form.service_location'|trans, colClass: 'col-md-8 col-lg-6 col-xl-5 mt-4' } %} {% include 'components/product/_address.html.twig' with { diff --git a/translations/product/messages.fr.xlf b/translations/product/messages.fr.xlf index 78dcc31..a165e60 100644 --- a/translations/product/messages.fr.xlf +++ b/translations/product/messages.fr.xlf @@ -151,6 +151,11 @@ A récupérer + + product.form.service_location + Lieu de la prestation + + product.form.address Adresse