{%extends "base.html"%} {% block content %}
Progress:
{% set class = 'completed' %} {% for sid,s in stages %} {% if stage==s %} {% set class = '' %}
{{sid + 1}}: {{s|titlecase}}
{% else %}
{{sid + 1}}: {{s|titlecase}}
{% endif %} {% endfor %}
{% if stage == 'choose_file' %}
{{wp_nonce_field('import-upload')|raw}}


Maximum permitted file size is {{maxsize}}.

{% elseif stage == 'match_fields' %}
{{wp_nonce_field('import-preview')|raw}}

Your file contains {{file.row_count|number_format}} rows. The first row has been skipped (it should contain column headers).

Match up fields in the database with fields in the uploaded file.

{% for column in table.get_columns %} {% endfor %}
Database Uploaded File
{{column.get_name|titlecase}} {% if column.is_required and not column.is_auto_increment %} (required) {% endif %}

{% elseif stage == 'preview' %}
{{wp_nonce_field('import-finish')|raw}}
{% if errors %}

The following incompatibilities were found in the data. Please correct and import again.

The row numbers do not include the header row, and the column numbers start from one.

Start import again

{% for error in errors %} {% endfor %}
Row Database Column Uploaded File Column Errors
{{error.row_number}} {{error.field_name|titlecase}} {% if error.column_name %} Column #{{error.column_number+1}}: {{error.column_name}} {% endif %} {% for message in error.messages %} {{message|raw}}
{% endfor %}
{% else %}

All data is valid and ready to import.

{% endif %}
{% endif %}
{% endblock %}