Skip to content

Commit 9a0b2cc

Browse files
committed
[TwigBridge] Replace default list style to icon
1 parent 966c586 commit 9a0b2cc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,13 @@
223223
{# Errors #}
224224

225225
{% block form_errors -%}
226-
{% if errors|length > 0 %}
226+
{% if errors|length > 0 -%}
227227
{% if form.parent %}<span class="help-block">{% else %}<div class="alert alert-danger">{% endif %}
228-
{{- parent() -}}
228+
<ul class="list-unstyled">
229+
{%- for error in errors -%}
230+
<li><span class="glyphicon glyphicon-exclamation-sign"></span> {{ error.message|trans({}, translation_domain) }}</li>
231+
{%- endfor -%}
232+
</ul>
229233
{% if form.parent %}</span>{% else %}</div>{% endif %}
230-
{% endif %}
234+
{%- endif %}
231235
{%- endblock form_errors %}

0 commit comments

Comments
 (0)