prise en compte de différents champs nom et prénom
FossilOrigin-Name: 2895a7a5054d102c3262500e9e67557129592b607830a406d30fd3596cdfe6a9
This commit is contained in:
parent
5995f33efd
commit
a3aa6fa200
8 changed files with 271 additions and 108 deletions
|
|
@ -13,47 +13,41 @@
|
|||
|
||||
<form method="post" action="{$self_url}" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
{*
|
||||
<legend>Objet (but) de l'association</legend>
|
||||
*}
|
||||
<dl class="config">
|
||||
<dt><label>Objet (but) de l'association</label> <b title="Champ obligatoire">(obligatoire)</b></dt>
|
||||
{input type="textarea" name="objet_asso" source=$plugin.config label="" required="required" cols="50" rows="4" maxlength=300}
|
||||
</dl>
|
||||
{*
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Droit à la réduction d'impôt</legend>
|
||||
*}
|
||||
<dl class="config">
|
||||
<dt><label>Articles du code général des impôts concernés par l'association : </label>
|
||||
<b title="Champ obligatoire">(obligatoire ; sélectionnez tous les articles qui s'appliquent à l'asociation)</b>
|
||||
<b title="Champ obligatoire">(obligatoire ; sélectionnez tous les articles qui s'appliquent à
|
||||
l'asociation)</b>
|
||||
</dt>
|
||||
{foreach from=$plugin_config->articlesCGI key="key" item="article"}
|
||||
{*
|
||||
À VÉRIFIER : {input : checked ne fonctionne pas si l'attribut name est un tableau...
|
||||
{*
|
||||
À VÉRIFIER : {input : checked ne fonctionne pas si l'attribut name est un tableau...
|
||||
{input type="checkbox" name="articlesCGI[]" value=$key label=$article.titre}
|
||||
*}
|
||||
<div>
|
||||
<input type="checkbox" name="articlesCGI[]" value="{$key}" class="choix"
|
||||
{if $article.valeur == 1}checked{/if}>
|
||||
<div>
|
||||
<input type="checkbox" name="articlesCGI[]" value="{$key}" class="choix"
|
||||
{if $article.valeur == 1}checked{/if}>
|
||||
<label>Article {$article.titre}</label>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</dl>
|
||||
|
||||
<dl class="config">
|
||||
<dt><label>Taux de réduction applicables : </label>
|
||||
<b title="Champ obligatoire">(obligatoire ; sélectionnez tous les taux qui s'appliquent à l'asociation)</b>
|
||||
<b title="Champ obligatoire">(obligatoire ; sélectionnez tous les taux qui s'appliquent à
|
||||
l'asociation)</b>
|
||||
</dt>
|
||||
{foreach from=$plugin_config->reduction key="key" item="taux"}
|
||||
<div>
|
||||
<input type="checkbox" name="tauxReduction[]" value="{$key}" class="choix"
|
||||
{if $taux.valeur == 1}checked{/if}>
|
||||
<label>Taux {$taux.taux}, ligne {$taux.ligne} de la déclaration
|
||||
{if $taux.remarque !== ""}({$taux.remarque})</label>{/if}
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" name="tauxReduction[]" value="{$key}" class="choix"
|
||||
{if $taux.valeur == 1}checked{/if}>
|
||||
<label>Taux {$taux.taux}, ligne {$taux.ligne} de la déclaration
|
||||
{if $taux.remarque !== ""}({$taux.remarque})</label>{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
|
@ -72,25 +66,42 @@
|
|||
|
||||
<dl class="config">
|
||||
<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}" />
|
||||
{else}
|
||||
<img id="signature" src="{$default_signature}" />
|
||||
{/if}
|
||||
{linkbutton shape="upload" label="Changer de signature" target="_dialog" href="upload.php?p=%s"|args:$path}
|
||||
<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}" />
|
||||
{else}
|
||||
<img id="signature" src="{$default_signature}" />
|
||||
{/if}
|
||||
{linkbutton shape="upload" label="Changer de signature" target="_dialog" href="upload.php?p=%s"|args:$path}
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Autres informations</legend>
|
||||
<dl class="config">
|
||||
<dl class="config">
|
||||
<dt><label>Ville</label></dt>
|
||||
<p>Précède la date sur le formulaire</p>
|
||||
{input type="text" name="ville_asso" source=$plugin.config label="" maxlength=50}
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
{* les champs de nom *}
|
||||
<?php $nbChamps = count($nomChamps); ?>
|
||||
<dl class="config" {if $nbChamps == 1}hidden{/if}>
|
||||
<dt><label>Champs nom et prénom</label></dt>
|
||||
<p>Sélectionnez et classez le(s) champ(s) qui représente(nt) le nom et le prénom du donateur</p>
|
||||
|
||||
<div>
|
||||
{foreach from=$nomChamps key="nom" item="champ"}
|
||||
<div>
|
||||
<input type="checkbox" name="champsNom[]" value={$nom} class="choix" {if $nbChamps == 1 || $champ.position != 0}checked{/if} >
|
||||
<label>{$champ.titre}</label>
|
||||
<div class="actions">
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<h3 class="warning">N'oubliez pas d'enregistrer, sinon les modifications ne seront pas prises en compte !</h3>
|
||||
|
||||
|
|
@ -98,4 +109,26 @@
|
|||
{csrf_field key="recusfiscaux_config"}
|
||||
{button type="submit" name="save" label="Enregistrer" shape="right" class="main"}
|
||||
</p>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var lesDivs = document.querySelectorAll('.actions');
|
||||
for (i = 0; i < lesDivs.length; ++i) {
|
||||
var up = document.createElement('a');
|
||||
up.className = 'icn up';
|
||||
up.innerHTML = '↑';
|
||||
up.title = 'Déplacer vers le haut';
|
||||
up.onclick = function(e) {
|
||||
var field = this.parentNode.parentNode;
|
||||
var p = field.previousSibling;
|
||||
while (p != null && p.nodeType == 3) { p = p.previousSibling; }
|
||||
field.parentNode.insertBefore(field, p);
|
||||
return false;
|
||||
};
|
||||
lesDivs[i].appendChild(up);
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
{/literal}
|
||||
Loading…
Add table
Add a link
Reference in a new issue