Differences From Artifact [2e38a73b19]:

To Artifact [406c2a793b]:


83
84
85
86
87
88
89

90
91
92
93
94
95
96
97
98
99



100

101
102
103
104
105
106
107
        {csrf_field key="add_cotisation"}
        {if $membre}<input type="hidden" name="id_membre" value="{$membre.id|escape}" />{/if}
        <input type="submit" name="add" value="Enregistrer &rarr;" />
    </p>
</form>

<script type="text/javascript">

{literal}
(function () {
    window.changeMoyenPaiement = function()
    {
        var elm = $('#f_moyen_paiement');
        toggleElementVisibility('.f_cheque', elm.value == 'CH');
        toggleElementVisibility('.f_banque', elm.value != 'ES');
    };

    changeMoyenPaiement();



    toggleElementVisibility('.f_compta', false);


    $('#f_moyen_paiement').onchange = changeMoyenPaiement;

    $('#f_id_cotisation').onchange = function () {
        if (this.options[this.selectedIndex].getAttribute('data-compta'))
        {
            toggleElementVisibility('.f_compta', true);







>










>
>
>
|
>







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
        {csrf_field key="add_cotisation"}
        {if $membre}<input type="hidden" name="id_membre" value="{$membre.id|escape}" />{/if}
        <input type="submit" name="add" value="Enregistrer &rarr;" />
    </p>
</form>

<script type="text/javascript">
var show_compta = {if $default_compta}true{else}false{/if};
{literal}
(function () {
    window.changeMoyenPaiement = function()
    {
        var elm = $('#f_moyen_paiement');
        toggleElementVisibility('.f_cheque', elm.value == 'CH');
        toggleElementVisibility('.f_banque', elm.value != 'ES');
    };

    changeMoyenPaiement();
    
    if (!show_compta)
    {
        toggleElementVisibility('.f_compta', false);
    }

    $('#f_moyen_paiement').onchange = changeMoyenPaiement;

    $('#f_id_cotisation').onchange = function () {
        if (this.options[this.selectedIndex].getAttribute('data-compta'))
        {
            toggleElementVisibility('.f_compta', true);