re-introduce post_text extension in fields.html.twig + tests

This commit is contained in:
2015-12-30 16:57:16 +01:00
parent 8849d8bb54
commit f145ae7f88
3 changed files with 140 additions and 0 deletions

View File

@@ -80,5 +80,29 @@
</script>
{% endblock cf_choices_row %}
{# extend the number type to add post_text extension #}
{% block number_widget %}
{%- if post_text is defined and post_text is not empty-%}
<div class="input_with_post_text">
{%- endif -%}
{{ block('form_widget') }}
{%- if post_text is defined and post_text is not empty-%}
<span class="post_text">{{ post_text }}</span>
</div>
{%- endif -%}
{% endblock %}
{# extend the number type to add post_text extension #}
{% block integer_widget %}
{%- if post_text is defined and post_text is not empty-%}
<div class="input_with_post_text">
{%- endif -%}
{{ block('form_widget') }}
{%- if post_text is defined and post_text is not empty-%}
<span class="post_text">{{ post_text }}</span>
</div>
{%- endif -%}
{% endblock %}
{# The choice_with_other_widget widget is defined in the main bundle #}