From fe595860f2d55e3340ea4c5eb7217259fe001d63 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 13 Jul 2022 13:35:37 +0200 Subject: [PATCH] replace 'hideLabel' form option by 'fullWidth' sometimes we want fullWidth and display label --- src/Bundle/ChillMainBundle/Form/Type/CommentType.php | 2 +- src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php | 2 +- src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php | 2 +- .../Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig | 2 +- .../ChillMainBundle/Resources/views/Form/fields.html.twig | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php index 3adca5eca..fb64ed3b1 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php @@ -59,7 +59,7 @@ class CommentType extends AbstractType $view->vars = array_replace( $view->vars, [ - 'hideLabel' => true, + 'fullWidth' => true, ] ); } diff --git a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php index d4c0d1611..a96c0e353 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php @@ -46,7 +46,7 @@ class PrivateCommentType extends AbstractType public function buildView(FormView $view, FormInterface $form, array $options) { - $view->vars['hideLabel'] = true; + $view->vars['fullWidth'] = true; } public function configureOptions(OptionsResolver $resolver) diff --git a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php index 92a1b26c3..36c599f71 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php @@ -108,7 +108,7 @@ class ScopePickerType extends AbstractType $view->vars = array_replace( $view->vars, [ - 'hideLabel' => true, + 'fullWidth' => true, ] ); } diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig index e0c43629e..f4a2c3294 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig @@ -60,7 +60,7 @@ {{- form_errors(form) -}} {%- else -%} - {% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %} + {% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %} {{- form_label(form) -}}
{{- form_widget(form, widget_attr) -}} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig index f45f91692..586b900aa 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig @@ -18,7 +18,7 @@ {% block form_row %} {% apply spaceless %} - {% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %} + {% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %}