{% if value is not defined %}
{% set value=-1 %}
{% endif %}
{% if just_items is not defined or not just_items %}
<select {% if multiple is defined and multiple %}multiple="multiple"{% endif %}>
{% endif %}
{% if empty_value is not defined or not empty_value %}
<option value="">{% trans from 'crud' %}choice_value.empty_value{% endtrans %}</option>
{% endif %}
{% for entity in entities %}
{% set pre = '' %}
{% if preText is defined %}
{% set pre = preText[entity.id] %}
{% endif %}
{% set post = '' %}
{% if postText is defined %}
{% set post = postText[entity.id] %}
{% endif %}
{% if entity.id == value %}
<option selected="selected" value="{{ entity.id }}">{{ entity }}</option>
{% else %}
<option value="{{ entity.id }}">{{ pre }}{{ entity }}{{ post }}</option>
{% endif %}
{% endfor %}
{% if just_items is not defined or not just_items %}
</select>
{% endif %}