kai-jacobsen/kontentblocks

View on GitHub
core/Fields/Definitions/templates/areaselect/default.twig

Summary

Maintainability
Test Coverage
{% extends Form.getLayout() %}
{% block fieldmarkup %}
    <select id='{{ Form.getInputFieldId }}' name='{{ Form.getFieldName() }}'>

        {% if Field.getArg('empty', true) %}
            <option value='' name=''>Bitte wählen</option>
        {% endif %}
        {% if areas %}
            {% for o in areas %}
                <option {{ selected(Field.getValue, o.id) }} value="{{ o.id }}">{{ o.name }}</option>
            {% endfor %}
        {% endif %}

    </select>
{% endblock %}S