{% extends 'base.html.twig' %} {% set navbar_is_transparent = false %} {% block title %}Modifier une annonce — {{ ad.title }}{% endblock %} {% form_theme form 'bootstrap_5_layout.html.twig' %} {% block body %}

Modifier mon annonce

{% if ad.updatedAt %}Modifiée le {{ ad.updatedAt|date('d/m/Y H:i') }}{% endif %} {% if ad.publishedAt %}Publiée le {{ ad.publishedAt|date('d/m/Y') }}{% endif %}
{% if ad.status %} {{ ad.status.value }} {% endif %}
Informations de l’annonce
{{ form_start(form, { attr: { class: 'needs-validation', novalidate: 'novalidate' } }) }}
{{ form_label(form.title, null, { label_attr: { class: 'form-label fw-semibold' } }) }} {{ form_widget(form.title, { attr: { class: 'form-control form-control-lg', placeholder: 'Titre de votre annonce' } }) }}
{{ form_label(form.description, null, { label_attr: { class: 'form-label fw-semibold' } }) }} {{ form_widget(form.description, { attr: { class: 'form-control', rows: 7, placeholder: 'Décrivez l’état, dimensions, accessoires, etc.' } }) }}
{{ form_label(form.price, null, { label_attr: { class: 'form-label fw-semibold' } }) }} {{ form_widget(form.price, { attr: { class: 'form-control', inputmode: 'decimal' } }) }}
{{ form_label(form.condition, null, { label_attr: { class: 'form-label fw-semibold' } }) }} {{ form_widget(form.condition, { attr: { class: 'form-select' } }) }}
{{ form_label(form.location, null, { label_attr: { class: 'form-label fw-semibold' } }) }} {{ form_widget(form.location, { attr: { class: 'form-control', placeholder: 'Ville / zone' } }) }}
{# ====== FOTOS (CollectionType) ====== #} {% if form.photos is defined %}

Photos

{% for photoForm in form.photos %}
{{ form_row(photoForm.imageFile) }}
{% if photoForm.vars.data and photoForm.vars.data.fileName %}
Photo
{% endif %}
{% endfor %}
{% endif %}
Annuler
{{ form_end(form) }}
Actions
Conseils
  • Un titre clair et une description détaillée améliorent la visibilité.
  • Un prix cohérent accélère les contacts.
  • Précisez la localisation exacte (port, ville).
  • Ajoutez plusieurs photos nettes.
{% block javascripts %} {{ parent() }} {% endblock %} {% endblock %}