{##
# Category selection dropdown box template
#}
<select
name="{{ this.getParam('fieldName') }}"
size="{{ this.getParam('size') }}"
{% if this.getFieldId() %}
id="{{ this.getFieldId() }}"
{% endif %}
{% if this.get('nonFixed') %}
style="width:200pt" class="form-control"
{% else %}
class="FixedSelect form-control"
{% endif %}
>
{% if this.getParam('allOption') %}
<option value="">{{ t('All') }}</option>
{% endif %}
{% if this.getParam('noneOption') %}
<option value="no_category">{{ t('Not assigned') }}</option>
{% endif %}
{% if this.getParam('rootOption') %}
<option value="" class="CenterBorder">{{ t('Root level') }}</option>
{% endif %}
{% for key, category in this.getCategories() %}
{% if this.getArrayField(category, 'category_id') != this.getParam('currentCategoryId') %}
<option value="{{ this.getArrayField(category, 'category_id') }}"
{% if this.isCategorySelected(category) %} selected="selected" {% endif %}>
{{ this.getIndentationString(category, 3, '-') }} {{ this.getCategoryName(category)|raw }}
</option>
{% endif %}
{% endfor %}
{% if this.isDisplayNoCategories() %}
<option value="">{{ t('-- No categories --') }}</option>
{% endif %}
</select>