Skip to content

Commit 3fb5ad4

Browse files
committed
minor #12164 [TwigBridge] Replace default list style to icon (Macsch15)
This PR was merged into the 2.6-dev branch. Discussion ---------- [TwigBridge] Replace default list style to icon | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Replaces default list style in **bootstrap_3_layout.html.twig** to icon. Requires Glyphicons from Bootstrap 3. Before: ![2014-10-07 11-55-50](https://cloud.githubusercontent.com/assets/1592053/4540807/d6f8eb46-4e0b-11e4-82bf-77b56fd1d17c.png) After: ![2014-10-07 11-55-07](https://cloud.githubusercontent.com/assets/1592053/4540810/e02fe048-4e0b-11e4-9f3b-69902c0ae32b.png) Commits ------- 9a0b2cc [TwigBridge] Replace default list style to icon
2 parents a05379e + 9a0b2cc commit 3fb5ad4

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)