layout of rendering - refs # 302

This commit is contained in:
Julien Fastré 2014-11-13 18:35:44 +01:00
parent 37375ec357
commit 869bed4ac8

View File

@ -1,12 +1,12 @@
<ul class="custom_fields choice"> <ul class="custom_fields choice">
{%- for choice in choices -%} {%- for choice in choices -%}
{% if choice['slug'] in selected %}{%- set is_selected = true -%}{%- else -%}{%- set is_selected = false -%}{%- endif -%} {% if choice['slug'] in selected %}{%- set is_selected = true -%}{%- else -%}{%- set is_selected = false -%}{%- endif -%}
{# {%- if choice['slug'] in selected -%} #} {%- if is_selected -%}
<li class="{% if true %} selected {% endif %}"> <li class="{% if is_selected or expanded == 1 %} selected {% endif %}">
{%- if multiple -%} {%- if is_selected -%}
<input type="checkbox" {% if is_selected %}checked{% endif %} /> <i class="fa fa-check-square-o"></i>
{%- else -%} {%- else -%}
<input type="radio" {% if is_selected %}checked{% endif %} /> <i class="fa fa-square-o"></i>
{%- endif -%} {%- endif -%}
{%- if choice['slug'] is not same as('_other') -%} {%- if choice['slug'] is not same as('_other') -%}
{{ choice['name'][app.request.locale]|default(choice['name'][locale]|default('Not available in your language'|trans)) }} {{ choice['name'][app.request.locale]|default(choice['name'][locale]|default('Not available in your language'|trans)) }}
@ -14,6 +14,6 @@
<span class="other">{{ 'Other value'|trans }}&nbsp;:</span> {{ choice['name'] }} <span class="other">{{ 'Other value'|trans }}&nbsp;:</span> {{ choice['name'] }}
{%- endif -%} {%- endif -%}
</li> </li>
{# {%- endif -%} #} {%- endif -%}
{%- endfor -%} {%- endfor -%}
</ul> </ul>