12345678910111213141516171819202122232425262728 |
- <p>
- Etat de l'article : <span class="badge badge-{{ article.state }}">{{ article.state | trans }}</span>
- </p>
- <div data-controller="slugger" >
- {{ form_start(form) }}
- {{ form_row(form.title) }}
- {% 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> {% 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' : ''}}">
- {{ form_label(form.slug) }}
- {{ form_errors(form.slug) }}
- {{ form_widget(form.slug) }}
- <div class="div-bouton-slug"><button type="button" class="bouton-slug" data-slugger-target="bouton" data-action="click->slugger#open">Générer un slug</butt></div>
- {{ form_help(form.slug) }}
- </div>
-
- {{ form_row(form.content) }}
- {{ form_row(form.publicationDate) }}
- {{ form_row(form.author) }}
- {{ form_row(form.publicationChoice) }}
- {{ form_rest(form)}}
- <button class="btn btn-green">{{ button_label|default('Sauvegarder') }}</button>
- {{ form_end(form) }}
- </div>
|