mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
handle types and categories in a single select input
This commit is contained in:
@@ -14,8 +14,7 @@
|
||||
{{ form_row(form.profession) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.types) }}
|
||||
{{ form_row(form.categories) }}
|
||||
{{ form_row(form.typesAndCategories) }}
|
||||
|
||||
{{ form_row(form.telephone) }}
|
||||
{{ form_row(form.email) }}
|
||||
|
@@ -48,13 +48,20 @@
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>{{ 'Type'|trans }}</dt>
|
||||
<dt>{{ 'thirdparty.Categories'|trans }}</dt>
|
||||
{% set types = [] %}
|
||||
{% for t in thirdParty.types %}
|
||||
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
||||
{% endfor %}
|
||||
{% for c in thirdParty.categories %}
|
||||
{% set types = types|merge([ c.name|localize_translatable_string ]) %}
|
||||
{% endfor %}
|
||||
<dd>
|
||||
{{ types|join(', ') }}
|
||||
{% if types|length > 0 %}
|
||||
{{ types|join(', ') }}
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'thirdParty.Any categories' }}</p>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>{{ 'Phonenumber'|trans }}</dt>
|
||||
|
Reference in New Issue
Block a user