Skip to content

Commit

Permalink
doc: exemple file for CSV import
Browse files Browse the repository at this point in the history
  • Loading branch information
Grafikart committed Apr 11, 2024
1 parent d46238e commit c4f9171
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions assets/css/modules/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ input:focus + label .switch,
button:not([class]):hover .icon-delete {
color: var(--red);
}
small.form-text {
display: block;
line-height: 1.4;
}
small.form-text a {
line-height: 1.1;
text-decoration: underline;
}

// Radio
// =============
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grafikart",
"version": "1.0.100",
"version": "1.0.101",
"main": "index.js",
"license": "MIT",
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions public/schools/students.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
email,months
[email protected],3
[email protected],4
Binary file added public/schools/students.xlsx
Binary file not shown.
6 changes: 6 additions & 0 deletions src/Http/Form/SchoolImportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$builder
->add('file', FileType::class, [
'label' => 'Fichier CSV',
'help' => <<<HTML
<a href='/schools/students.csv' download target='_blank'>Fichier d'exemple</a>
(format <a href='/schools/students.xlsx' download target='_blank'>xlsx</a>,
les en-têtes doivent être présentes.
HTML,
'help_html' => true,
])
->add('emailSubject', TextType::class, [
'label' => "Sujet de l'email"
Expand Down

0 comments on commit c4f9171

Please sign in to comment.