{% extends "base.html" %}
{% block body_class %}themed-bg{% endblock %}
{% block content %}
<div class="container">
  <div class="card">
    <h1 class="page-title">Import CSV</h1>
    <p class="muted">
      Columns (in order): <code>Subject, Illustration, Application, Scripture, Source, Talk Title, Talk Number, Code, Date, Date Edited</code>.
      You can dry-run to preview changes without writing.
    </p>
    <form method="post" enctype="multipart/form-data">
      {% csrf_token %}
      <div class="form-row">
        {{ form.file.label_tag }} {{ form.file }}
        {% if form.file.errors %}<div class="err">{{ form.file.errors|striptags }}</div>{% endif %}
      </div>
      <label class="check-pill">
        {{ form.dry_run }} <span>Dry run (preview only)</span>
      </label>
      <div class="result-toolbar" style="margin-top:12px;">
        <div class="rt-left"></div>
        <div class="rt-right">
          <a class="btn btn-secondary" href="{% url 'settings_home' %}">Cancel</a>
          <button class="btn btn-primary" type="submit">Run Import</button>
        </div>
      </div>
    </form>
  </div>
</div>
{% endblock %}