diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index e69de29..0000000 diff --git a/LICENCE b/LICENCE deleted file mode 100644 index ad1b3a4..0000000 --- a/LICENCE +++ /dev/null @@ -1,14 +0,0 @@ -Plugin Facturation pour Garradin -Copyright (C) 2019 zou - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation version 3 of the License - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see \ No newline at end of file diff --git a/garradin_plugin.ini b/garradin_plugin.ini index a32c0bf..9b0cdc8 100644 --- a/garradin_plugin.ini +++ b/garradin_plugin.ini @@ -2,7 +2,7 @@ nom="Reçus fiscaux" description="Génération de reçus fiscaux pour les dons des membres" auteur="jce" url="https://git.roflcopter.fr/lesanges/recus-fiscaux-garradin" -version="0.4" +version="0.5" menu=1 config=1 min_version="1.1" diff --git a/install.php b/install.php index 17063aa..6abc40a 100644 --- a/install.php +++ b/install.php @@ -2,7 +2,7 @@ namespace Garradin; use Garradin\Entities\Files\File; -// « signature » par défaut à remplacer (voir configuration) +// « signature » par défaut à remplacer (voir l'onglet de configuration) $path = __DIR__ . '/data/default_signature.png'; $default_signature_file = (new File)->createAndStore('skel/plugin/recusFiscaux','default_signature.png', $path, null); diff --git a/templates/upload.tpl b/templates/upload.tpl new file mode 100644 index 0000000..45089b0 --- /dev/null +++ b/templates/upload.tpl @@ -0,0 +1,18 @@ +{include file="admin/_head.tpl" title="Envoi de fichier"} + +{form_errors} + +
+
+ Téléverser des fichiers +
+ {input type="file" name="file[]" multiple=true label="Fichiers à envoyer" data-enhanced=1} +
+

+ {csrf_field key=$csrf_key} + {button type="submit" name="upload" label="Envoyer" shape="upload" class="main"} +

+
+
+ +{include file="admin/_foot.tpl"} diff --git a/www/admin/upload.php b/www/admin/upload.php new file mode 100644 index 0000000..945ce80 --- /dev/null +++ b/www/admin/upload.php @@ -0,0 +1,23 @@ +runIf('upload', function () use ($parent) { + $sig_file = File::uploadMultiple($parent, 'file'); + $_SESSION['sig_file'] = $sig_file; + +}, $csrf_key, PLUGIN_ROOT . '/www/admin/config.php'); + +$tpl->assign(compact('parent', 'csrf_key')); + +$tpl->display(PLUGIN_ROOT . '/templates/upload.tpl');