diff --git a/assets/styles/app.css b/assets/styles/app.css index 7099f06..371b876 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -29,17 +29,17 @@ details { border-width: 1px; } -.loginPost, .registerPost, .requestPost { +.centerForm { text-align: center; div { margin-bottom: 1rem; } -} -.textLabel, .requestPost label, .registerPost label:not([for="registration_form_agreeTerms"]) { - display: block; - font-size: 15px; + label:not([for="registration_form_agreeTerms"], [for="_remember_me"]) { + display: block; + font-size: smaller; + } } .navbar { diff --git a/src/Form/PageType.php b/src/Form/PageType.php index 08cd46f..77eea3b 100644 --- a/src/Form/PageType.php +++ b/src/Form/PageType.php @@ -5,6 +5,8 @@ use App\Entity\Category; use App\Entity\Page; use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\Extension\Core\Type\TextType; +use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -15,11 +17,18 @@ class PageType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options): void { $builder - ->add('titleJson') - ->add('contentJson') ->add('category', EntityType::class, [ 'class' => Category::class, 'choice_label' => 'titleJson[fr]', + 'label_format' => 'Catégorie' + ]) + ->add('titleJson', TextType::class, [ + 'label_format' => 'Titre' + ]) + ->add('contentJson', TextareaType::class, [ + 'attr' => + ['rows' => 10, 'cols' => 60], + 'label_format' => 'Contenu' ]) ; diff --git a/templates/page/_form.html.twig b/templates/page/_form.html.twig index bf20b98..1f13bbd 100644 --- a/templates/page/_form.html.twig +++ b/templates/page/_form.html.twig @@ -1,4 +1,4 @@ -{{ form_start(form) }} +{{ form_start(form, {'attr': {'class': 'centerForm'}}) }} {{ form_widget(form) }} {{ form_end(form) }} diff --git a/templates/page/edit.html.twig b/templates/page/edit.html.twig index b4fc792..ab16cd7 100644 --- a/templates/page/edit.html.twig +++ b/templates/page/edit.html.twig @@ -1,13 +1,14 @@ {% extends 'base.html.twig' %} -{% block title %}Édition de page{% endblock %} +{% block title %}Modification de page{% endblock %} {% block main %} -

Édition de la page {{page.titleJson.fr}}

+
+

Modification de la page {{page.titleJson.fr}}

- {{ include('page/_form.html.twig', {'button_label': 'Modifier'}) }} + {{ include('page/_form.html.twig', {'button_label': 'Valider'}) }} - Retour à la liste + Retour - {{ include('page/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/reset_password/request.html.twig b/templates/reset_password/request.html.twig index 679ff53..2015171 100644 --- a/templates/reset_password/request.html.twig +++ b/templates/reset_password/request.html.twig @@ -6,7 +6,7 @@ {% for flash_error in app.flashes('reset_password_error') %} {% endfor %} -
+

Réinitialiser le mot de passe

{{ form_start(requestForm) }} diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig index e8cd7af..ab7b842 100644 --- a/templates/security/login.html.twig +++ b/templates/security/login.html.twig @@ -3,7 +3,7 @@ {% block title %}Se connecter!{% endblock %} {% block main %} -
+
{% if error %}
{{ error.messageKey|trans(error.messageData, 'security') }}
diff --git a/templates/security/register.html.twig b/templates/security/register.html.twig index 8eff4da..45a7b1e 100644 --- a/templates/security/register.html.twig +++ b/templates/security/register.html.twig @@ -6,7 +6,7 @@ {% for flash_error in app.flashes('verify_email_error') %} {% endfor %} -
+

Inscription

{{ form_errors(registrationForm) }}