mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
feat: convert all file inputs to FilePond for standardized uploading
- Add csv_import queue type (storeAsFile, no async upload) for CSV import dialog - Convert file-field.php partial to FilePond with field-name→queue-type mapping - Conditionally skip server config for storeAsFile queues in buildFilePondOptions - Skip FilePond init for inputs inside closed <dialog> elements - Trigger FilePond init when import dialog opens - Load FilePond CSS/JS assets on admin index page
This commit is contained in:
@@ -46,7 +46,7 @@ document.addEventListener('htmx:afterSwap',()=>{document.querySelectorAll('input
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="btn btn--primary btn--sm" id="import-dialog-btn"
|
||||
onclick="document.getElementById('import-dialog').showModal()">
|
||||
onclick="document.getElementById('import-dialog').showModal(); window.XamxamInitFilePonds()">
|
||||
Importer
|
||||
</button>
|
||||
</div>
|
||||
@@ -214,7 +214,11 @@ document.addEventListener('htmx:afterSwap',()=>{document.querySelectorAll('input
|
||||
<div>
|
||||
<label for="csv_file">Fichier CSV</label>
|
||||
<div class="admin-file-input">
|
||||
<input type="file" id="csv_file" name="csv_file" accept=".csv" required>
|
||||
<input type="file" id="csv_file"
|
||||
name="csv_file"
|
||||
class="tfe-file-picker"
|
||||
data-queue-type="csv_import"
|
||||
required>
|
||||
<small class="admin-file-hint">
|
||||
Colonnes : Identifiant, Titre, Sous-titre, Auteur·ice(s), Contact, Promoteur·ice(s), Format, Année, AP, Orientation, Finalité, Mots-clés, Synopsis, Contexte, Remarques, Langue, Autorisation, License, taille, Points sur 20, lien BAIU<br>
|
||||
Quatre premières lignes ignorées — Séparateur : virgule — UTF-8
|
||||
|
||||
Reference in New Issue
Block a user