Ajout du mode de saisie radio+entree libre
[spip_souscriptions.git] / formulaires / souscription.html
index b238b7d..7d7184a 100644 (file)
@@ -21,7 +21,7 @@
         <li 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}})</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>]
                [<p class="explication">(#ENV{montant_explication})</p>]
         </li>
              #SET{name,courriel}#SET{obli,'obligatoire'}#SET{defaut,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
              </li>
 
 
+             [(#CONFIG{souscription/proposer_infolettre,off}|=={on}|oui)
              #SET{name,envoyer_info}#SET{obli,''}#SET{defaut,'non'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
              <li 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>
-       </li>
+                                       <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>
+                               </li>
+                               ]
 
-       [(#ENV{type_souscription}|=={adhesion}|oui)
-              [(#SAISIE{oui_non, informer_comite_local, label=<:souscription:label_informer_comite_local:> })]
-            ]
+             [(#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}}}
+             <li 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>
+                               </li>
+                               ]
       </ul>
 
       <p class="boutons"><input type="submit" class="submit" value="<:souscription:confirmer:>" /></p>
 </div>
 <script type="text/javascript">
        jQuery(function(){
-               jQuery(".suite.fieldset").each(function(){
+               jQuery(".formulaire_souscription_don .suite.fieldset").each(function(){
                        var me=this;
                        jQuery(me).prev(".editer").find("input.checkbox").click(function(){
                                if (jQuery(this).prop("checked"))
 input.checkbox:checked+label {font-weight: bold;}
 li.suite {margin-left: 40px;}
 li.suite.none {display: none;}
-</style>
\ No newline at end of file
+</style>