Explorar el Código

Correction du slug vide dans l'édition

Sangfroid hace 1 mes
padre
commit
4aaef7b1c6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      templates/article/_form.html.twig

+ 1 - 1
templates/article/_form.html.twig

@@ -7,7 +7,7 @@
 
         {% set cacherFormulaire = article.slug and not article.slug is same as '' and form.children.slug.vars.errors|length == 0 %}
         <div data-slugger-target="ligneSlug" class="ligne-slug {{ cacherFormulaire ? '' : 'hidden' }}">
-            <div><span>Permalien</span> {{ url('app_view', {slug: article.slug}) }}</div>
+            <div><span>Permalien</span> {% if article.slug %}{{ url('app_view', {slug: article.slug}) }}{% endif %}</div>
             <button type="button" class="bouton-slug" data-slugger-target="bouton-show" data-action="click->slugger#show">Modifier</button>
         </div>
         <div id="formulaire-slug" data-slugger-target="formulaire" class="{{ cacherFormulaire ? 'hidden' : ''}}">