Premiere version publique
This commit is contained in:
1 parent
a25eb5aa1a
commit
8aed0ac517
16 files changed
+2021
No files matched your search
@@ -0,0 +1,48 @@
|
||||
{{* ---------- Vote sur un sondage simple (public) ---------- *}}
|
||||
{{#form on="voter_simple"}}
|
||||
{{if $_POST.voter_simple}}
|
||||
{{:assign var="vs_nom" value=$_POST.nom_vote|strval|trim}}
|
||||
{{:assign var="vs_choix" value=$_POST.choix_option|strval|trim}}
|
||||
{{:assign var="vs_remarque" value=$_POST.remarque|strval|trim}}
|
||||
{{if $vs_nom != "" && $vs_choix != ""}}
|
||||
{{#foreach from=$s.votes_simple item="v"}}
|
||||
{{if $v.nom != $vs_nom}}
|
||||
{{:assign var="new_votes_simple." value=$v}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{:assign var="ligne_vs" nom=$vs_nom choix=$vs_choix remarque=$vs_remarque}}
|
||||
{{:assign var="new_votes_simple." value=$ligne_vs}}
|
||||
{{*:debug new_votes_simple=$new_votes_simple*}}
|
||||
{{:save id=$_POST.voter_simple votes_simple=$new_votes_simple}}
|
||||
{{:redirect url="%s?msg=vote"|args:$module.url}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:form_errors}}
|
||||
{{/form}}
|
||||
|
||||
{{* ---------- Vote sur un sondage de disponibilités (public) ---------- *}}
|
||||
{{#form on="voter_creneau"}}
|
||||
{{if $_POST.voter_creneau}}
|
||||
{{:assign var="saisi_nom" value=$_POST.nom_vote|strval|trim}}
|
||||
{{:assign var="saisi_remarque" value=$_POST.remarque|strval|trim}}
|
||||
{{if $saisi_nom}}
|
||||
{{#foreach from=$s.votes item="v"}}
|
||||
{{if $v.nom != $saisi_nom}}
|
||||
{{:assign var="new_votes." value=$v}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{:debug new_votes=$new_votes}}
|
||||
{{#foreach from=$s.creneaux item="c"}}
|
||||
{{:assign var="val" from="_POST.dispo.%s"|args:$c.id}}
|
||||
{{:assign var="new_choix.%s"|args:$c.id value=$val|intval}}
|
||||
{{/foreach}}
|
||||
{{:assign var="ligne" nom=$saisi_nom choix=$new_choix remarque=$saisi_remarque}}
|
||||
{{:assign var="new_votes." value=$ligne}}
|
||||
{{:save id=$s.id votes=$new_votes}}
|
||||
{{:redirect url="%s?msg=vote"|args:$module.url}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:form_errors}}
|
||||
{{/form}}
|
||||
Reference in new issue
Block a user