messing stuff up
This commit is contained in:
32
plugins/importer/templates/importer/upload.html
Normal file
32
plugins/importer/templates/importer/upload.html
Normal file
@ -0,0 +1,32 @@
|
||||
{% 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 & 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 %}
|
Reference in New Issue
Block a user