{% load i18n %}

<div class="controls controls-row">
    <input name="excel_field[]" type="hidden" value="{{ item|escape }}" />
    <select name="excel_field[]" class="span3">
        <option>{% trans "Select field from excel..." %}</option>
        {% for field in excel_fields %}
            {% ifequal field item %}
                <option value="{{ field|escape }}" selected="selected">
                    {{ field|escape }}
                </option>
            {% else %}
                <option value="{{ field|escape }}">
                    {{ field|escape }}
                </option>
            {% endifequal %}
        {% endfor %}
    </select>

    <input type="text" name="custom_field[]"
           class="span3 hide custom_field"
           placeholder="Enter new property name" />

    <select name="case_field[]" class="case_field span3">
        <option value="">{% trans "Select property name..." %}</option>

        {% for field in case_fields %}
        <option value="{{ field|escape }}">
            {{ field|escape }}
        </option>
        {% endfor %}
    </select>

    <label class="checkbox span3">
        <input type="checkbox" class="new_property" />
        {% trans "Create a new property instead" %}
    </label>

    <input type="hidden"
           class="is_date_field"
           name="is_date_field[]"
           value="false" />
</div>

{% load i18n %}

<div class="controls controls-row">
    <select name="excel_field[]" class="span3">
        <option>{% trans "Select field from excel..." %}</option>
        {% for field in excel_fields %}
            {% ifequal field item %}
                <option value="{{ field|escape }}" selected="selected">
                    {{ field|escape }}
                </option>
            {% else %}
                <option value="{{ field|escape }}">
                    {{ field|escape }}
                </option>
            {% endifequal %}
        {% endfor %}
    </select>

    <input type="text" name="custom_field[]"
           class="span3 hide custom_field"
           placeholder="Enter new property name" />

    <select name="case_field[]" class="case_field span3">
        <option value="">{% trans "Select property name..." %}</option>

        {% for field in case_fields %}
        <option value="{{ field|escape }}">
            {{ field|escape }}
        </option>
        {% endfor %}
    </select>

    <label class="checkbox span3">
        <input type="checkbox" class="new_property" />
        {% trans "Create a new property instead" %}
    </label>

    <input type="hidden"
           class="is_date_field"
           name="is_date_field[]"
           value="false" />
</div>

Fix bug causing duplicate excel_field in form
Fix bug causing duplicate excel_field in form
