Début ajout fonctionnalités demandées :
- paramétrer le numéro de reçu - imprimer à la demande l'adresse de courriel FossilOrigin-Name: 10c1ca642474c2b00b7d0197afc736f2c2aca3b453808ac1fda19e14b0acc092
This commit is contained in:
parent
b077f70fb3
commit
e219afb405
5 changed files with 127 additions and 32 deletions
|
|
@ -18,7 +18,9 @@ if (f('save') && $form->check('recusfiscaux_config'))
|
|||
{
|
||||
try {
|
||||
// objet de l'association
|
||||
$plugin->setConfig('objet_asso', trim(f('objet_asso')));
|
||||
if ($plugin->getConfig('objet_asso') != trim(f('objet_asso'))) {
|
||||
$plugin->setConfig('objet_asso', trim(f('objet_asso')));
|
||||
}
|
||||
|
||||
// articles du CGI
|
||||
$confArticles = $plugin->getConfig('articlesCGI');
|
||||
|
|
@ -45,8 +47,14 @@ if (f('save') && $form->check('recusfiscaux_config'))
|
|||
$plugin->setConfig("reduction", $confTaux);
|
||||
|
||||
// nom, fonction et signature du responsable
|
||||
$plugin->setConfig('nom_responsable', trim(f('nom_responsable')));
|
||||
$plugin->setConfig('fonction_responsable', trim(f('fonction_responsable')));
|
||||
if ($plugin->getConfig('nom_responsable') != trim(f('nom_responsable'))) {
|
||||
$plugin->setConfig('nom_responsable', trim(f('nom_responsable')));
|
||||
}
|
||||
if ($plugin->getConfig('fonction_responsable') != trim(f('fonction_responsable'))) {
|
||||
$plugin->setConfig('fonction_responsable', trim(f('fonction_responsable')));
|
||||
}
|
||||
|
||||
// signature
|
||||
if (isset($_SESSION['sig_file']) && count($_SESSION['sig_file']) > 0)
|
||||
{
|
||||
// supprimer la signature précédente, si besoin
|
||||
|
|
@ -63,7 +71,9 @@ if (f('save') && $form->check('recusfiscaux_config'))
|
|||
|
||||
// autres informations
|
||||
// ville
|
||||
$plugin->setConfig('ville_asso', trim(f('ville_asso')));
|
||||
if ($plugin->getConfig('ville_asso') != trim(f('ville_asso'))) {
|
||||
$plugin->setConfig('ville_asso', trim(f('ville_asso')));
|
||||
}
|
||||
|
||||
// champs pour le nom et prénom
|
||||
foreach ($champsNom as $nom => $champ)
|
||||
|
|
@ -85,6 +95,11 @@ if (f('save') && $form->check('recusfiscaux_config'))
|
|||
}
|
||||
}
|
||||
|
||||
$conf_numerotation = $plugin->getConfig('numerotation');
|
||||
$chaine_numerotation = (isset($conf_numerotation->prefixe) && $conf_numerotation->prefixe != "") ? $conf_numerotation->prefixe : 'XXX';
|
||||
$chaine_numerotation .= $conf_numerotation->separateur . $conf_numerotation->defaut;
|
||||
$afficher_courriel = false;
|
||||
|
||||
// trier les champs de nom pour l'affichage
|
||||
uasort($champsNom, function ($a, $b)
|
||||
{
|
||||
|
|
@ -93,9 +108,11 @@ uasort($champsNom, function ($a, $b)
|
|||
|
||||
$tpl->assign('ok', qg('ok') !== null);
|
||||
$path = qg('path') ?: File::CONTEXT_CONFIG;
|
||||
$tpl->assign('path', $path);
|
||||
//$tpl->assign('path', $path);
|
||||
$tpl->assign('default_signature', \Garradin\WWW_URL . "plugin/recusfiscaux/default_signature.png");
|
||||
$tpl->assign('plugin_config', $plugin->getConfig());
|
||||
$tpl->assign('champsNom', $champsNom);
|
||||
//$tpl->assign('champsNom', $champsNom);
|
||||
$tpl->assign('plugin_css', ['style.css']);
|
||||
//$tpl->assign('chaine_numerotation', $chaine_numerotation);
|
||||
$tpl->assign(compact('path', 'champsNom', 'chaine_numerotation', 'afficher_courriel'));
|
||||
$tpl->display(PLUGIN_ROOT . '/templates/config.tpl');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue