{% load form_extras %}

{% if not column.hidden %}

    {% if edit %}
    <td>
        {% if field|class_name == 'BooleanField' %}
            <input name="{{row.id}}_{{column.label}}_old"
                   type="hidden"
                   value="{{ row|value:column.label }}"/>
            <input id="{{row.id}}_{{column.label}}"
                   name="{{row.id}}_{{column.label}}"
                   type="checkbox" {% if row|value:column.label %}checked{% endif %}/>
        {% else %}
            <input name="{{row.id}}_{{column.label}}_old"
                   type="hidden"
                   value="{{ row|value:column.label }}"/>
            <input name="{{row.id}}_{{column.label}}"
                   class="form-control"
                   type="text"
                   value="{{ row|value:column.label }}"/>
        {% endif %}
    </td>
    {% else %}
    <td>
        {% if field|class_name == 'BooleanField' %}
            {{ row|value:column.label }}
        {% else %}
            {{ row|value:column.label }}
        {% endif %}
    </td>
    {% endif %}

{% endif %}
