Differences From Artifact [4ac3bc61b8]:

To Artifact [ef40dcb0a6]:


82
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
113
114
115
116
117
118
119





120
121
122
123
124
        {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);
            changeMoyenPaiement();
        }
        else
        {
            toggleElementVisibility('.f_compta', false);
            changeMoyenPaiement();
        }
    };





} ());
{/literal}
</script>

{include file="admin/_foot.tpl"}







<










<
<
<
<
<















>
>
>
>
>





82
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
113
114
115
116
117
118
119
120
121
122
123
        {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();






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

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

    if (!$('#f_id_cotisation').options[$('#f_id_cotisation').selectedIndex].getAttribute('data-compta'))
    {
        toggleElementVisibility('.f_compta', false);
    }
} ());
{/literal}
</script>

{include file="admin/_foot.tpl"}