{% ckan_extends %}

{% block basic_fields %}
    {{ super() }}

    {# only for new or raw resource #}
    {% if data.__len__() == 0 or data.get('disable_parsing', False) %}
        {% call form.checkbox('disable_parsing', id='field-disable-parsing', label=_('Preserve original files (reduces searchability)'), value=1, checked=data.disable_parsing, error=errors.disable_parsing) %}
            <span class="info-block info-block-small">
                <i class="fa fa-info-circle"></i>
                {{ _('Where possible, we try to extract records from your file to make them searchable. Only tick the box if your upload contains multiple files, multiple spreadsheet tabs, or if you want to make the full original file available for any other reason. You cannot revert to using raw files once the data have been extracted.') }}
            </span>
        {% endcall %}
    {% endif %}

    {% call form.checkbox('download_original_filenames', id='field-download-original-filenames', label=_('Preserve original filenames in downloads'), value=1, checked=data.download_original_filenames, error=errors.download_original_filenames) %}
        <span class="info-block info-block-small">
            <i class="fa fa-info-circle"></i>
            {{ _('When users download files, we usually change the filenames to include the resource ID. Tick the box if the original file names are important and you would like users to see these instead.') }}
        </span>
    {% endcall %}
{% endblock %}
