Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Form/CategoryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
use Symfony\Component\Form\CallbackTransformer;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;

class CategoryType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('titleJson');
->add('titleJson', TextType::class, [
'label_format' => 'Titre'
]);

$builder->get('titleJson')
->addModelTransformer(new CallbackTransformer(
Expand Down
2 changes: 1 addition & 1 deletion templates/chapter/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block main %}
<article>
<h1>Éditer Chapitre</h1>
<h1>Éditer Chapitre</h1>

{{ include('chapter/_form.html.twig', {'button_label': 'Valider'}) }}

Expand Down
8 changes: 5 additions & 3 deletions templates/chapter/new.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
{% block title %}New Chapter{% endblock %}

{% block main %}
<h1>Ajouter un nouveau chapitre</h1>
<article>
<h1>Ajouter un nouveau chapitre</h1>

{{ include('chapter/_form.html.twig') }}
{{ include('chapter/_form.html.twig') }}

<a href="{{ path('app_chapter_index') }}">Retour à la liste</a>
<a href="{{ path('app_chapter_index') }}">Retour</a>
</article>
{% endblock %}