simplification de la configuration et des choix de tarifs et taux
FossilOrigin-Name: 0887b9389829b41439ac7ff12d1594b40573d3a049298e311100165fccb4a567
This commit is contained in:
parent
8147e5791a
commit
6d49553ed1
@ -89,6 +89,7 @@ body
|
||||
#final
|
||||
{
|
||||
grid-area: signature;
|
||||
height : 5cm;
|
||||
}
|
||||
|
||||
.rubrique
|
||||
|
@ -61,17 +61,17 @@
|
||||
<fieldset>
|
||||
<legend>Nom, fonction et signature du responsable</legend>
|
||||
<dl class="config">
|
||||
<dt><label>Nom</label> <b title="Champ obligatoire">(obligatoire)</b></dt>
|
||||
{input type="text" name="nom_responsable" source=$plugin.config label="" required="required" maxlength=50}
|
||||
<dt><label>Nom</label></dt>
|
||||
{input type="text" name="nom_responsable" source=$plugin.config label="" maxlength=50}
|
||||
</dl>
|
||||
|
||||
<dl class="config">
|
||||
<dt><label>Fonction</label> <b title="Champ obligatoire">(obligatoire)</b></dt>
|
||||
{input type="text" name="fonction_responsable" source=$plugin.config label="" required="required" maxlength=50}
|
||||
<dt><label>Fonction</label></dt>
|
||||
{input type="text" name="fonction_responsable" source=$plugin.config label="" maxlength=50}
|
||||
</dl>
|
||||
|
||||
<dl class="config">
|
||||
<dt><label>Signature</label> <b title="Champ obligatoire">(obligatoire)</b></dt>
|
||||
<dt><label>Signature</label></dt>
|
||||
<p>L'image de la signature doit être d'une taille « raisonnable » et avoir un fond transparent</p>
|
||||
{if $plugin_config.signature != ''}
|
||||
<img id="signature" src="/{$plugin_config.signature}" />
|
||||
|
@ -54,8 +54,13 @@
|
||||
{foreach from=$plugin_config->reduction item="reduc"}
|
||||
{if $reduc->valeur == 1}
|
||||
<span class="radio-btn">
|
||||
<input type="radio" id="{$reduc->taux}"
|
||||
name="taux_reduction" value="{$reduc->taux}" />
|
||||
<input
|
||||
type="radio"
|
||||
id="{$reduc->taux}"
|
||||
name="taux_reduction"
|
||||
value="{$reduc->taux}"
|
||||
{if $nbTaux == 1}checked{/if}
|
||||
/>
|
||||
<label for="{$reduc->taux}">{$reduc->taux}{if $reduc->remarque != ""} - {$reduc->remarque}{/if}</label>
|
||||
</span>
|
||||
{/if}
|
||||
@ -87,7 +92,20 @@
|
||||
{foreach from=$activitesTarifsComptes item="activite"}
|
||||
<tr>
|
||||
<td>
|
||||
{input type="checkbox" name="tarifs[]" value=$activite.idTarif}
|
||||
{if $nbTarifs == 1}
|
||||
{input
|
||||
type="checkbox"
|
||||
name="tarifs[]"
|
||||
value=$activite.idTarif
|
||||
checked="checked"
|
||||
}
|
||||
{else}
|
||||
{input
|
||||
type="checkbox"
|
||||
name="tarifs[]"
|
||||
value=$activite.idTarif
|
||||
}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<span>{$activite.titreActivite} - {$activite.titreTarif}</span>
|
||||
@ -96,8 +114,14 @@
|
||||
{foreach from=$plugin_config->reduction item="reduc"}
|
||||
{if $reduc->valeur == 1}
|
||||
<span class="radio-btn">
|
||||
<input type="radio" id="taux_{$reduc->taux}_{$activite.idTarif}"
|
||||
name="taux_reduction_{$activite.idTarif}" value="{$reduc->taux}" disabled />
|
||||
<input
|
||||
type="radio"
|
||||
id="taux_{$reduc->taux}_{$activite.idTarif}"
|
||||
name="taux_reduction_{$activite.idTarif}"
|
||||
value="{$reduc->taux}"
|
||||
{if $nbTarifs > 1}disabled{/if}
|
||||
{if $nbTaux == 1}checked{/if}
|
||||
/>
|
||||
<label for="taux_{$reduc->taux}_{$activite.idTarif}">{$reduc->taux}{if $reduc->remarque != ""} - {$reduc->remarque}{/if}</label>
|
||||
</span>
|
||||
{/if}
|
||||
|
@ -13,6 +13,12 @@ if ($anneesFiscales[0] < $anneeCourante) {
|
||||
|
||||
// libellés pour les taux de réduction
|
||||
$_SESSION['ligneReduction'] = Utils::getLignesReduction($plugin->getConfig('reduction'));
|
||||
// compter le nombre de taux de réduction activés
|
||||
$nbTaux = 0;
|
||||
foreach ($plugin->getConfig('reduction') as $taux)
|
||||
{
|
||||
if ($taux->valeur == 1) { ++$nbTaux; }
|
||||
}
|
||||
|
||||
// liste des activités, cotisations et comptes associés
|
||||
$activitesTarifsComptes = Utils::getActivitesTarifsEtComptes();
|
||||
@ -21,7 +27,9 @@ $activitesTarifsComptes = Utils::getActivitesTarifsEtComptes();
|
||||
$tpl->assign('anneesFiscales', $anneesFiscales);
|
||||
$tpl->assign('anneeCourante', $anneeCourante);
|
||||
$tpl->assign('activitesTarifsComptes', $activitesTarifsComptes);
|
||||
$tpl->assign('nbTarifs', count($activitesTarifsComptes));
|
||||
$tpl->assign('plugin_config', $plugin->getConfig());
|
||||
$tpl->assign('nbTaux', $nbTaux);
|
||||
$tpl->assign('plugin_css', ['style.css']);
|
||||
|
||||
// envoyer au template
|
||||
|
Loading…
Reference in New Issue
Block a user