Ajout possibilité choisir champs identité et adresse membre
This commit is contained in:
parent
2ecbac159a
commit
57e6ad09f9
7 changed files with 250 additions and 182 deletions
|
|
@ -1,11 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Paheko;
|
||||
use Paheko\Users\DynamicFields;
|
||||
|
||||
require_once __DIR__ . '/_inc.php';
|
||||
|
||||
$session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN);
|
||||
|
||||
$champsPaheko = DynamicFields::getInstance()->listAssocNames();
|
||||
$champsPaheko = array('' => '- Choisir un champ -') + $champsPaheko;
|
||||
|
||||
$form->runIf('save', function () use ($plugin) {
|
||||
$plugin->setConfigProperty('rna_asso', trim(f('rna_asso')));
|
||||
$plugin->setConfigProperty('siret_asso', trim(f('siret_asso')));
|
||||
|
|
@ -26,9 +30,14 @@ $form->runIf('save', function () use ($plugin) {
|
|||
$plugin->setConfigProperty('logo', (bool)f('logo'));
|
||||
$plugin->setConfigProperty('footer', f('footer'));
|
||||
|
||||
$plugin->setConfigProperty('nom_client', f('nom_client'));
|
||||
$plugin->setConfigProperty('prenom_client', f('prenom_client'));
|
||||
$plugin->setConfigProperty('adresse_client', f('adresse_client'));
|
||||
$plugin->setConfigProperty('code_postal_client', f('code_postal_client'));
|
||||
$plugin->setConfigProperty('ville_client', f('ville_client'));
|
||||
|
||||
$plugin->setConfigProperty('validate_cp', (bool)f('validate_cp'));
|
||||
$plugin->setConfigProperty('unique_client_name', (bool)f('unique_client_name'));
|
||||
|
||||
$plugin->setConfigProperty('pattern', f('pattern'));
|
||||
|
||||
$plugin->save();
|
||||
|
|
@ -38,5 +47,6 @@ $form->runIf('save', function () use ($plugin) {
|
|||
$tpl->assign('ok', qg('ok') !== null);
|
||||
$tpl->assign('conf', $plugin->getConfig());
|
||||
$tpl->assign('patterns', \Paheko\Plugin\Facturation\PATTERNS_LIST);
|
||||
$tpl->assign('champsPaheko', $champsPaheko);
|
||||
|
||||
$tpl->display(PLUGIN_ROOT . '/templates/config.tpl');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue