Fix block form_row in form theme templates, comparing more cases.

See this note https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/502#note_1311993084
This commit is contained in:
Mathieu Jaumotte 2023-03-13 16:18:20 +01:00
parent 9d1703ccba
commit bbddf7813e
3 changed files with 11 additions and 3 deletions

View File

@ -39,7 +39,7 @@ class PrivateCommentType extends AbstractType
$builder $builder
->add('comments', ChillTextareaType::class, [ ->add('comments', ChillTextareaType::class, [
'disable_editor' => $options['disable_editor'], 'disable_editor' => $options['disable_editor'],
'label' => false, 'label' => $options['label'],
]) ])
->setDataMapper($this->dataMapper); ->setDataMapper($this->dataMapper);
} }

View File

@ -68,7 +68,8 @@
{{- form_errors(form) -}} {{- form_errors(form) -}}
</div> </div>
{% else %} {% else %}
<div class="col-sm"> <div class="col-12 clear">{{- form_label(form) -}}</div>
<div class="col-sm-12">
{{- form_widget(form, widget_attr) -}} {{- form_widget(form, widget_attr) -}}
{{- form_help(form) -}} {{- form_help(form) -}}
{{- form_errors(form) -}} {{- form_errors(form) -}}

View File

@ -56,6 +56,10 @@
</div> </div>
{% endapply %} {% endapply %}
{% endblock form_row %} {% endblock form_row %}
{#
The block 'form_row' above may be removed !
Read this note: https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/502#note_1311993084
#}
{% block choice_widget_expanded %} {% block choice_widget_expanded %}
{% apply spaceless %} {% apply spaceless %}
@ -201,7 +205,6 @@
{% block private_comment_row %} {% block private_comment_row %}
{{ form_label(form) }}
{{ form_row(form) }} {{ form_row(form) }}
{% endblock %} {% endblock %}
@ -211,6 +214,10 @@
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
{% block comment_row %}
{{ form_row(form) }}
{% endblock %}
{% block comment_widget %} {% block comment_widget %}
{% for entry in form %} {% for entry in form %}
{{ form_widget(entry) }} {{ form_widget(entry) }}