This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
/
souscription.html
192 lines (182 loc) · 11.1 KB
/
souscription.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[(#SET{liste_pays,#ARRAY{}})]
<BOUCLE_p(PAYS){par nom}>
[(#SET{liste_pays, #GET{liste_pays}|array_merge{#ARRAY{#CODE, #NOM}}})]
</BOUCLE_p>
<div class="formulaire_spip formulaire_#FORM formulaire_#FORM-#ENV{id_souscription,nouveau}[ formulaire_souscription_(#ENV{type_souscription})][ formulaire_souscription_(#ENV{id_souscription_campagne})]">
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV**{message_ok})</p>]
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
[(#ENV{editable})
<form method="post" action="#ENV{action}"><div>
#ACTION_FORMULAIRE{#ENV{action}}
<div class="editer-groupe">
[(#ENV{_montant_type}|sinon{none}|=={none}|non)
#SET{name,montant}#SET{obli,'obligatoire'}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
<label for="#GET{name}">#ENV{_montant_label}</label>[
<span class='erreur_message'>(#GET{erreurs})</span>
][<span class="input">(#INCLURE{fond=formulaires/inc-souscription-#ENV{_montant_type},name=#GET{name},valeur=#ENV*{#GET{name},#GET{defaut}},obli=#GET{obli},montants=#ENV{_montant_datas},montant_libre})</span>]
[(#ENV{_abo_montant_type}|=={none}|ou{#ENV{_montant_explication}|=={#ENV{_abo_montant_explication}}|non})
[<p class="explication">(#ENV{_montant_explication})</p>]
]
</div>
]
[(#ENV{_abo_montant_type}|sinon{none}|=={none}|non)
#SET{name,abo_montant}#SET{obli,'obligatoire'}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
#SET{abo,''}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
<label for="#GET{name}">#ENV{_abo_montant_label}</label>[
<span class='erreur_message'>(#GET{erreurs})</span>
][(#ENV{_montant_type}|in_array{#LISTE{radio,radioinput}}|et{#ENV{_abo_montant_type}|in_array{#LISTE{radio,radioinput}}}|oui)#SET{name,montant}#SET{abo,'abo_'}
][<span class="input">(#INCLURE{fond=formulaires/inc-souscription-#ENV{_abo_montant_type},name=#GET{name},abo=#GET{abo},valeur=#ENV*{#GET{name},#GET{defaut}},obli=#GET{obli},montants=#ENV{_abo_montant_datas},abo_montant_libre})</span>]
[<p class="explication">(#ENV{_abo_montant_explication})</p>]
</div>
]
#SET{name,courriel}#SET{obli,'obligatoire'}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
<label for="#GET{name}"><:souscription:label_courriel:></label>[
<span class='erreur_message'>(#GET{erreurs})</span>
]<input type="email" name="#GET{name}" class="text email" value="#ENV*{#GET{name},#GET{defaut}}" id="#GET{name}" [(#HTML5|et{#GET{obli}})required='required']/>
</div>
#SET{name,recu_fiscal}#SET{obli,''}#SET{defaut,'non'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">[
<span class='erreur_message'>(#GET{erreurs})</span>
]
#SET{val,off}
<input type="hidden" name="#GET{name}" value="#GET{val}" />
#SET{val,on}
<div class="choix">
<input type="checkbox" name="#GET{name}" class="checkbox" id="#GET{name}_#GET{val}" value="#GET{val}"[(#ENV{#GET{name},#GET{defaut}}|=={#GET{val}}|oui)checked="checked"] />
<label for="#GET{name}_#GET{val}"><:souscription:label_recu_fiscal:></label>
</div>
[<p class="explication dispositions_fiscales small">
(#CONFIG{souscription/dispositions_fiscales_explications}|nl2br)
</p>]
</div>
<div class="fieldset saisie_suite souscription_bloc_fiscal[(#ENV{#GET{name},#GET{defaut}}|=={#GET{val}}|non)none]">
<fieldset>
<legend><:souscription:label_legende_bloc_fiscal:></legend>
[(#INCLURE{fond=inclure/souscription/bloc_fiscal_intro,type_souscription=#ENV{type_souscription}})]
<div class="editer-groupe">
#SET{name0,civilite}#SET{obli1,''}#SET{defaut0,''}#SET{erreurs0,#ENV**{erreurs}|table_valeur{#GET{name0}}}
#SET{name1,prenom}#SET{obli1,'obligatoire'}#SET{defaut1,''}#SET{erreurs1,#ENV**{erreurs}|table_valeur{#GET{name1}}}
#SET{name2,nom}#SET{obli2,'obligatoire'}#SET{defaut2,''}#SET{erreurs2,#ENV**{erreurs}|table_valeur{#GET{name2}}}
<div class="editer [ (#GET{obli1})][ (#GET{erreurs1}|oui)erreur][ (#GET{erreurs2}|oui)erreur]">
<div class="demi left editer_[(#GET{name0})]">
<label for="#GET{name0}"><:souscription:label_civilite:></label>[
<span class='erreur_message'>(#GET{erreurs0})</span>
]<select name="#GET{name0}" class="select" id="#GET{name0}">
<option value=""></option>
<option value="monsieur"[ (#ENV*{#GET{name0},#GET{defaut0}}|=={monsieur}|oui)selected="selected"]><:souscription:label_monsieur:></option>
<option value="madame"[ (#ENV*{#GET{name0},#GET{defaut0}}|=={madame}|oui)selected="selected"]><:souscription:label_madame:></option>
</select>
</div>
<div class="demi left editer_[(#GET{name1})]">
<label for="#GET{name1}"><:souscription:label_prenom:></label>[
<span class='erreur_message'>(#GET{erreurs1})</span>
]<input type="text" name="#GET{name1}" class="text" value="#ENV*{#GET{name1},#GET{defaut1}}" id="#GET{name1}"/>
</div>
<div class="demi right editer_[(#GET{name2})]">
<label for="#GET{name2}"><:souscription:label_nom:></label>[
<span class='erreur_message'>(#GET{erreurs2})</span>
]<input type="text" name="#GET{name2}" class="text" value="#ENV*{#GET{name2},#GET{defaut2}}" id="#GET{name2}"/>
</div>
</div>
#SET{name,adresse}#SET{obli,'obligatoire'}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
<label for="#GET{name}"><:souscription:label_adresse:></label>[
<span class='erreur_message'>(#GET{erreurs})</span>
]<textarea name="#GET{name}" class="textarea" rows="3">
#ENV*{#GET{name},#GET{defaut}}</textarea>
</div>
#SET{name1,code_postal}#SET{obli1,'obligatoire'}#SET{defaut1,''}#SET{erreurs1,#ENV**{erreurs}|table_valeur{#GET{name1}}}
#SET{name2,ville}#SET{obli2,'obligatoire'}#SET{defaut2,''}#SET{erreurs2,#ENV**{erreurs}|table_valeur{#GET{name2}}}
<div class="editer [ (#GET{obli1})][ (#GET{erreurs1}|oui)erreur][ (#GET{erreurs2}|oui)erreur]">
<div class="demi left editer_[(#GET{name1})]">
<label for="#GET{name1}"><:souscription:label_code_postal:></label>[
<span class='erreur_message'>(#GET{erreurs1})</span>
]<input type="text" name="#GET{name1}" class="text" value="#ENV*{#GET{name1},#GET{defaut1}}" id="#GET{name1}"/>
</div>
<div class="demi right editer_[(#GET{name2})]">
<label for="#GET{name2}"><:souscription:label_ville:></label>[
<span class='erreur_message'>(#GET{erreurs2})</span>
]<input type="text" name="#GET{name2}" class="text" value="#ENV*{#GET{name2},#GET{defaut2}}" id="#GET{name2}"/>
</div>
</div>
[(#SAISIE{selection, pays, label=<:souscription:label_pays:>, datas=#GET{liste_pays}})]
#SET{name,telephone}#SET{obli,''}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
<label for="#GET{name}"><:souscription:label_telephone:></label>[
<span class='erreur_message'>(#GET{erreurs})</span>
]<input type="text" name="#GET{name}" class="text" value="#ENV*{#GET{name},#GET{defaut}}" id="#GET{name}"/>
</div>
</div>
[<p class="explication donnees_personnelles small">
(#CONFIG{souscription/donnees_personnelles_explications}|nl2br)
</p>]
</fieldset>
</div>
[(#CONFIG{souscription/proposer_infolettre,off}|=={on}|oui)
#SET{name,envoyer_info}#SET{obli,''}#SET{defaut,'off'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">[
<span class='erreur_message'>(#GET{erreurs})</span>
]
#SET{val,off}
<input type="hidden" name="#GET{name}" value="#GET{val}" />
#SET{val,on}
<div class="choix">
<input type="checkbox" name="#GET{name}" class="checkbox" id="#GET{name}_#GET{val}" value="#GET{val}"[(#ENV{#GET{name},#GET{defaut}}|=={#GET{val}}|oui)checked="checked"] />
<label for="#GET{name}_#GET{val}"><:souscription:label_envoyer_info:></label>
</div>
</div>
]
[(#ENV{type_souscription}|=={adhesion}|et{#CONFIG{souscription/proposer_informer_comite_local,off}|=={on}}|oui)
#SET{name,informer_comite_local}#SET{obli,''}#SET{defaut,'non'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
<div class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">[
<span class='erreur_message'>(#GET{erreurs})</span>
]
#SET{val,off}
<input type="hidden" name="#GET{name}" value="#GET{val}" />
#SET{val,on}
<div class="choix">
<input type="checkbox" name="#GET{name}" class="checkbox" id="#GET{name}_#GET{val}" value="#GET{val}"[(#ENV{#GET{name},#GET{defaut}}|=={#GET{val}}|oui)checked="checked"] />
<label for="#GET{name}_#GET{val}"><:souscription:label_informer_comite_local:></label>
</div>
</div>
]
</div>
<p class="boutons"><input type="submit" class="submit" value="<:souscription:confirmer:>" /></p>
</div>
</form>
]
[(#ENV**{_souscription_paiement})]
</div>
<script type="text/javascript">
jQuery(function(){
jQuery(".formulaire_souscription_don .saisie_suite.fieldset").each(function(){
var me=this;
jQuery(me).prev(".editer").find("input.checkbox").click(function(){
if (jQuery(this).prop("checked"))
jQuery(me).show('fast');
else
jQuery(me).hide('fast');
})
})
/*[(#ENV{_montant_type}|sinon{none}|=={none}|non)
[(#ENV{_montant_type}|sinon{none}|=={none}|non)*/
jQuery(".editer_abo_montant").find("input[name=abo_montant],select[name=abo_montant]").change(function(){
jQuery(".editer_montant").find("input.text,select").val('');
jQuery(".editer_montant").find("input.radio").prop("checked",false);
});
jQuery(".editer_montant").find("input[name=montant],select[name=montant]").change(function(){
jQuery(".editer_abo_montant").find("input[name=abo_montant].text,select[name=abo_montant]").val('');
jQuery(".editer_abo_montant").find("input[name=abo_montant].radio").prop("checked",false);
});
/*]
]*/
})
</script>
<style>
input.checkbox:checked+label {font-weight: bold;}
.saisie_suite {margin-left: 40px;}
.saisie_suite.none {display: none;}
</style>