bug #26983 [TwigBridge] [Bootstrap 4] Fix PercentType error rendering. (alexismarquis)

This PR was submitted for the 4.0 branch but it was merged into the 3.4 branch instead (closes #26983).

Discussion
----------

[TwigBridge] [Bootstrap 4] Fix PercentType error rendering.

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | /
| License       | MIT
| Doc PR        | /

Fixes displaying errors for Symfony\Component\Form\Extension\Core\Type\PercentType, as shown in the following screenshots :

**Before :**
![image](https://user-images.githubusercontent.com/4643674/38994012-83ea9598-43e5-11e8-94ac-0eaee1296982.png)

**After :**
![image](https://user-images.githubusercontent.com/4643674/38994047-9f26a50e-43e5-11e8-866d-0cbe0e30b114.png)

Commits
-------

4715397 Fix PercentType error rendering.
This commit is contained in:
Nicolas Grekas 2018-04-20 11:32:48 +02:00
commit 09d1a2b099

View File

@ -106,8 +106,7 @@
{%- endblock dateinterval_widget %}
{% block percent_widget -%}
<div class="input-group{{ not valid ? ' form-control is-invalid' }}">
{% set valid = true %}
<div class="input-group">
{{- block('form_widget_simple') -}}
<div class="input-group-append">
<span class="input-group-text">%</span>