harmonisation présentation personnes-activités
FossilOrigin-Name: 53550421b288837f1c2120259c638952fdf2853441a1315359d7af51c57c80d8
This commit is contained in:
parent
2fddc192f9
commit
328789b923
6 changed files with 137 additions and 71 deletions
|
|
@ -13,7 +13,7 @@ if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "") {
|
|||
$_SESSION['taux_reduction'] = $_POST['taux_reduction'];
|
||||
|
||||
// champs pour le nom et prénom
|
||||
$confNoms = (array) $plugin->getConfig('nomChamps');
|
||||
$confNoms = Utils::getChampsNom($config, $plugin);
|
||||
uasort($confNoms, function ($a, $b)
|
||||
{
|
||||
return $a->position - $b->position;
|
||||
|
|
@ -34,22 +34,24 @@ $_SESSION['membresDonateurs'] = Utils::getDonateurs($_SESSION['annee_recu'],
|
|||
// ------------------------------------------------------------------------
|
||||
// fonctions pour l'affichage
|
||||
|
||||
// afficher les informations d'une personne
|
||||
// Afficher les informations d'une personne
|
||||
$tpl->register_function('afficher_debut_personne', function ($params)
|
||||
{
|
||||
$versement = $params['versement'];
|
||||
$idUser = $versement->idUser;
|
||||
$personne = $_SESSION['membresDonateurs'][$idUser];
|
||||
$idVersement = $versement->idUser;
|
||||
$out = sprintf('<h3 class="personne">Versements de %s : <span id="total_%s">0,00 €</span></h3>',
|
||||
$out = '<details class="personne" open="open">
|
||||
<summary class="personne">';
|
||||
$out .= sprintf('<h4 class="personne">Versements de %s : <span id="total_%s">0,00 €</span></h4>',
|
||||
$personne->nomPrenom,
|
||||
$idVersement);
|
||||
$out .= '</summary>';
|
||||
$out .= sprintf('
|
||||
<fieldset class="versements" id="versements_%s">',
|
||||
$idVersement);
|
||||
$out .= sprintf('
|
||||
<input type="checkbox" class="check_%s" id="check_%s"',
|
||||
$idVersement,
|
||||
<input type="checkbox" id="check_%s"',
|
||||
$idVersement);
|
||||
$out .= sprintf(' onclick="cocherDecocherPersonne(check_%s, total_%s)" />',
|
||||
$idVersement,
|
||||
|
|
@ -71,17 +73,28 @@ $tpl->register_function('afficher_versement', function ($params)
|
|||
$out = '<div class="';
|
||||
$out .= ($rang%2==0) ? 'pair">' : 'impair">';
|
||||
$out .= sprintf('
|
||||
<input type="checkbox" class="check_%s" id="check_%s_%s"
|
||||
name="selected[]" value="%s"
|
||||
onclick="cocherDecocherVersement(check_%s_%s, total_%s)" />
|
||||
<label for="check_%s_%s"></label>
|
||||
<span class="montant">%.2f</span>
|
||||
<input type="checkbox"
|
||||
class="check_%s"
|
||||
id="check_%s_%s"
|
||||
name="selected[]"
|
||||
value="%s"
|
||||
onclick="cocherDecocherVersement(check_%s_%s, total_%s)" />',
|
||||
$idVersement,
|
||||
$idVersement, $rang,
|
||||
$rang,
|
||||
$idVersement, $rang, $idVersement
|
||||
);
|
||||
$out .= sprintf('
|
||||
<label for="check_%s_%s"></label>',
|
||||
$idVersement, $rang
|
||||
);
|
||||
$out .= sprintf('
|
||||
<span class="montant">%.2f</span>',
|
||||
$versement->versement/100
|
||||
);
|
||||
$out .= sprintf('
|
||||
<span>%s</span>
|
||||
</div>',
|
||||
$idVersement, $idVersement,
|
||||
$rang, $rang,
|
||||
$idVersement, $rang, $idVersement, $idVersement, $rang,
|
||||
$versement->versement/100,
|
||||
date_format(date_create($versement->date),"d/m/Y"));
|
||||
return $out;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue