Skip to content

Conversation

@yceruto
Copy link
Member

@yceruto yceruto commented Jan 6, 2017

By default bootstrap_3_layout.html.twig template use glyphicon- icon when the form_errors block is rendered. In this demo app we use font-awesome (fa-) icon library, so this PR try to fix that.

Before After
post-comment-error post-comment-fixed

{# use font-awesome icon library #}
<li><span class="fa fa-exclamation-triangle"></span> {{ error.message }}</li>
{%- endfor -%}
</ul>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yceruto, you are missing indentation here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

@javiereguiluz
Copy link
Member

@yceruto a very nice catch! Thanks for reporting this problem and solving it elegantly.

@javiereguiluz javiereguiluz merged commit 8b746b6 into symfony:master Jan 8, 2017
javiereguiluz added a commit that referenced this pull request Jan 8, 2017
This PR was merged into the master branch.

Discussion
----------

Use font-awesome icon in "form_errors" block

By default [`bootstrap_3_layout.html.twig` template use `glyphicon-` icon when the `form_errors` block is rendered](https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig#L259). In this demo app we use font-awesome (`fa-`) icon library, so this PR try to fix that.

| Before | After |
| ---- | ---- |
| ![post-comment-error](https://cloud.githubusercontent.com/assets/2028198/21733360/1098de26-d42c-11e6-92f7-a8f5b54e09b1.png)  | ![post-comment-fixed](https://cloud.githubusercontent.com/assets/2028198/21733425/5fddca46-d42c-11e6-9ede-4e1846aa01f7.png)  |

Commits
-------

8b746b6 use font-awesome icon in "form_errors" block
@yceruto yceruto deleted the fix_form_errors_layout branch January 9, 2017 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants