10000 Template for table, Foundation and Bootstrap 3 · symfony/symfony@067c681 · GitHub
[go: up one dir, main page]

Skip to content

Commit 067c681

Browse files
Mathieu Piotmpiot
Mathieu Piot
authored andcommitted
Template for table, Foundation and Bootstrap 3
1 parent d3e3e49 commit 067c681

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
<div class="form-group{% if (not compound or force_error|default(false)) and not valid %} has-error{% endif %}">
9393
{{- form_label(form) -}}
9494
{{- form_widget(form) -}}
95+
{{- form_help(form) -}}
9596
{{- form_errors(form) -}}
9697
</div>
9798
{%- endblock form_row %}
@@ -149,3 +150,11 @@
149150
{% if form is not rootform %}</span>{% else %}</div>{% endif %}
150151
{%- endif %}
151152
{%- endblock form_errors %}
153+
154+
{# Help #}
155+
156+
{% block form_help -%}
157+
{% if help is not empty %}
158+
<span class="help-block">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</span>
159+
{% endif %}
160+
{%- endblock form_help %}

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291

292292
{% block form_help -%}
293293
{% if help is not empty %}
294-
<p class="form-help">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</p>
294+
<p class="help-text">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</p>
295295
{% endif %}
296296
{%- endblock form_help %}
297297

src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<td>
99
{{- form_errors(form) -}}
1010
{{- form_widget(form) -}}
11+
{{- form_help(form) -}}
1112
</td>
1213
</tr>
1314
{%- endblock form_row -%}

src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
<div class="large-12 columns{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}">
272272
{{ form_label(form) }}
273273
{{ form_widget(form) }}
274+
{{ form_help(form) }}
274275
{{ form_errors(form) }}
275276
</div>
276277
</div>

0 commit comments

Comments
 (0)
0