Fix the money form type render with Bootstrap3
There is a confusion between the variable naming, and the result expected. When prepend variable is false, the currency symbol must be add after the widget. When the money_patternstarts with {{, prepend variable must be false.
This commit is contained in:
parent
37cd583e78
commit
637a4411d7
@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
{% block money_widget -%}
|
{% block money_widget -%}
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
{% set prepend = '{{' == money_pattern[0:2] %}
|
{% set append = money_pattern starts with '{{' %}
|
||||||
{% if not prepend %}
|
{% if not append %}
|
||||||
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
|
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{- block('form_widget_simple') -}}
|
{{- block('form_widget_simple') -}}
|
||||||
{% if prepend %}
|
{% if append %}
|
||||||
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
|
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user