Files
natureinpots_community/plugins/importer/templates/importer/upload.html
2025-06-03 20:46:11 -05:00

33 lines
1.1 KiB
HTML

{% extends 'core_ui/base.html' %}
{% block content %}
<div class="container mt-4">
<h2 class="mb-3">Import Plants from CSV</h2>
<div class="alert alert-info" role="alert">
<strong>Expected CSV headers (in this exact order):</strong>
<code>{{ headers }}</code>
</div>
<form method="POST" enctype="multipart/form-data" class="needs-validation" novalidate>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label for="file" class="form-label">Select CSV file to upload</label>
<input type="file" class="form-control" id="file" name="file" accept=".csv" required>
</div>
<button type="submit" class="btn btn-primary">Upload &amp; Import</button>
</form>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="mt-4">
{% for category, message in messages %}
<div class="alert alert-{{ 'danger' if category == 'error' else category }}" role="alert">
{{ message }}
</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
</div>
{% endblock %}