From 26c113349a6a1ae4c71be8800eedf161016e6cff Mon Sep 17 00:00:00 2001 From: engel <> Date: Fri, 25 Feb 2022 17:07:24 +0000 Subject: [PATCH] =?UTF-8?q?ajouts=20fichiers=20oubli=C3=A9s=20;=20suppress?= =?UTF-8?q?ion=20fichiers=20inutiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FossilOrigin-Name: 28fb218f925df004a6471dfeb2df98aac1da5c505559adf051425ac76cc1dead --- CHANGELOG | 0 LICENCE | 14 -------------- garradin_plugin.ini | 2 +- install.php | 2 +- templates/upload.tpl | 18 ++++++++++++++++++ www/admin/upload.php | 23 +++++++++++++++++++++++ 6 files changed, 43 insertions(+), 16 deletions(-) delete mode 100644 CHANGELOG delete mode 100644 LICENCE create mode 100644 templates/upload.tpl create mode 100644 www/admin/upload.php 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');