fix bug : CFChoice was not rendered correctly with _other option

This commit is contained in:
2014-11-27 13:54:58 +01:00
parent 65b8499458
commit a925533fc8
2 changed files with 9 additions and 12 deletions

View File

@@ -5,15 +5,15 @@
{%- if is_selected -%}
<li class="{% if is_selected or expanded == 1 %} selected {% endif %}">
{%- if is_selected -%}
<i class="fa fa-check-square-o"></i>
<i class="fa fa-check-square-o"></i>&nbsp;
{%- else -%}
<i class="fa fa-square-o"></i>
<i class="fa fa-square-o"></i>&nbsp;
{%- endif -%}
{%- if choice['slug'] is not same as('_other') -%}
{{ choice['name'][app.request.locale]|default(choice['name'][locale]|default('Not available in your language'|trans)) }}
{%- else -%}
{{ choice['name'] }}
{%- endif -%}
{%- if choice['slug'] is not same as('_other') -%}
{{ choice['name'][app.request.locale]|default(choice['name'][locale]|default('Not available in your language'|trans)) }}
{%- else -%}
<span class="other">{{ 'Other value'|trans }}&nbsp;:</span> {{ choice['name'] }}
{%- endif -%}
</li>
{%- endif -%}
{%- endfor -%}