test gestion signature
FossilOrigin-Name: a6b1717eeee8e4c3a852ccd1363d47e4cbe561476fcc0d0eb08a0615b85bcc17
This commit is contained in:
parent
3aa094f4db
commit
f9f59d7454
6 changed files with 64 additions and 25 deletions
|
|
@ -1,14 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace Garradin;
|
||||
use Garradin\Files\Files;
|
||||
use Garradin\Entities\Files\File;
|
||||
|
||||
error_log("WWW_URL = " . WWW_URL);
|
||||
|
||||
$session->requireAccess($session::SECTION_CONFIG, $session::ACCESS_ADMIN);
|
||||
$art_sel=f('articlesCGI') ? : [];
|
||||
|
||||
$path = qg('path') ?: File::CONTEXT_CONFIG;
|
||||
$context = Files::getContext($path);
|
||||
$context_ref = Files::getContextRef($path);
|
||||
|
||||
if (f('save') && $form->check('recusfiscaux_config'))
|
||||
{
|
||||
try {
|
||||
// objet de l'association
|
||||
$plugin->setConfig('objet_asso', trim(f('objet_asso')));
|
||||
|
||||
// articles du CGI
|
||||
$confArticles = $plugin->getConfig('articlesCGI');
|
||||
// effacer l'ancienne configuration
|
||||
for ($i = 0; $i < count($confArticles); ++$i) {
|
||||
|
|
@ -19,6 +30,12 @@ if (f('save') && $form->check('recusfiscaux_config'))
|
|||
$confArticles[$article]->valeur = 1;
|
||||
}
|
||||
$plugin->setConfig("articlesCGI", $confArticles);
|
||||
|
||||
// signature
|
||||
if (isset($_SESSION['sig_file'])) {
|
||||
$plugin->setConfig('signature', $_SESSION['sig_file'][0]->path);
|
||||
}
|
||||
|
||||
\Garradin\Utils::redirect(PLUGIN_URL . 'config.php?ok');
|
||||
}
|
||||
catch (UserException $e)
|
||||
|
|
@ -28,6 +45,7 @@ if (f('save') && $form->check('recusfiscaux_config'))
|
|||
}
|
||||
|
||||
$tpl->assign('ok', qg('ok') !== null);
|
||||
$tpl->assign('path', $path);
|
||||
$tpl->assign('plugin_config', $plugin->getConfig());
|
||||
$tpl->assign('plugin_css', ['style.css']);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue