<div class="form-group">
    <div class="col-sm-4"><label>{{field.label}}</label></div>
    <div class="col-sm-8">
        {% if field.disabled %}
        <input name="{{field.key}}" class="form-control" type="text" value="{{field.value}}" disabled/>
        {% else %}
        <select name="{{field.key}}" class="form-control">
            {% if field.pairs %}
            {% for value, label in field.pairs.items %}
            <option value="{{ value }}" {% if field.value == value %}selected{% endif %}>{{ label }}</option>
            {% endfor %}
            {% else %}
            {% for value in field.values %}
            <option value="{{ value }}" {% if field.value == value %}selected{% endif %}>{{ value }}</option>
            {% endfor %}
            {% endif %}
        </select>
        {% endif %}
    </div>
</div>
