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
->add('comments', ChillTextareaType::class, [
'disable_editor' => $options['disable_editor'],
'label' => false,
'label' => $options['label'],
])
->setDataMapper($this->dataMapper);
}

View File

@ -68,7 +68,8 @@
{{- form_errors(form) -}}
</div>
{% 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_help(form) -}}
{{- form_errors(form) -}}

View File

@ -56,6 +56,10 @@
</div>
{% endapply %}
{% 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 %}
{% apply spaceless %}
@ -201,7 +205,6 @@
{% block private_comment_row %}
{{ form_label(form) }}
{{ form_row(form) }}
{% endblock %}
@ -211,6 +214,10 @@
{% endfor %}
{% endblock %}
{% block comment_row %}
{{ form_row(form) }}
{% endblock %}
{% block comment_widget %}
{% for entry in form %}
{{ form_widget(entry) }}