1 {% extends
"layout.html" %}
5 <div class=
"span6 well">
6 <form action=
"{{ url_for('admin_vote_edit', voteid=vote.id) }}" method=
"post" class=
"form-horizontal">
7 <fieldset><legend>Édition du vote
</legend>
8 <div class=
"control-group">
9 <label class=
"control-label" for=
"title">Titre
</label>
10 <div class=
"controls">
11 <input type=
"text" size=
30 name=
"title" id=
"title" value=
"{{ vote.title }}" />
12 <span class=
"help-inline"><font color=
"red">*
</font></span>
15 <div class=
"control-group">
16 <label class=
"control-label" for=
"description">Description
</label>
17 <div class=
"controls">
18 <textarea class=
"input-xlarge" name=
"description" id=
"description">{{ vote.description }}
</textarea>
21 <div class=
"accordion">
22 <div class=
"accordion-group">
23 <div class=
"accordion-heading">
24 <a class=
"accordion-toggle" data-toggle=
"collapse" href=
"#infos">+ Informations
</a>
26 <div id=
"infos" class=
"accordion-body collapse">
27 <div class=
"accordion-inner">
28 <div class=
"control-group">
29 <label class=
"control-label" for=
"category">Catégorie
</label>
30 <div class=
"controls">
31 <input type=
"text" data-provide=
"typeahead" data-source='[
"ca",
"membres"]' size=
30 name=
"category" id=
"category" value=
"{{ vote.category }}" />
34 <div class=
"control-group">
35 <label class=
"control-label" for=
"category">Quorum
</label>
36 <div class=
"controls">
37 <select name=
"quorum" id=
"quorum">
38 {% for quorum in quorums %}
39 {% if quorum == vote.quorum %}
40 <option value=
"{{ quorum }}" selected
>{{ quorum *
100 }}%
</option>
42 <option value=
"{{ quorum }}">{{ quorum *
100 }}%
</option>
48 <div class=
"control-group">
49 <label class=
"control-label" for=
"role">Groupe
</label>
50 <div class=
"controls">
51 <select name=
"role" id=
"role" disabled
>
52 <option>{{ group.name }}
</option>
54 <p class=
"help-block">Groupe d'utilisateur concernés par le vote et ayant le droit de voter
</p>
57 <div class=
"control-group">
58 <label class=
"control-label" for=
"days">Durée (jours)
</label>
59 <div class=
"controls">
60 <select class=
"span1" name=
"days" id=
"days">
61 {% for i in range(
1,
31) %}
62 {% if i == vote.duration %}
63 <option selected
>{{ i }}
</option>
65 <option>{{ i }}
</option>
69 <span class=
"help-inline">Du {{ vote.date_begin }} au {{ vote.date_end }}
</span>
72 <div class=
"control-group">
73 <label class=
"control-label" for=
"reminder">Rappel par mail les
</label>
74 <div class=
"controls">
75 <select class=
"span1" name=
"reminder" id=
"reminder">
76 {% for i in range(
1,
31) %}
77 {% if i == vote.reminder_last_days %}
78 <option selected
>{{ i }}
</option>
80 <option>{{ i }}
</option>
84 <span class=
"help-inline">derniers jours
</span>
90 <div class=
"accordion-group">
91 <div class=
"accordion-heading">
92 <a class=
"accordion-toggle" data-toggle=
"collapse" href=
"#options">+ Options
</a>
94 <div id=
"options" class=
"accordion-body collapse">
95 <div class=
"accordion-inner">
96 <div class=
"control-group">
97 <label class=
"control-label">Options
</label>
98 <div class=
"controls">
99 <label class=
"checkbox">
100 <input type=
"checkbox" name=
"transparent" {% if vote.is_transparent ==
1 %} checked {% endif %}
/>
101 Les votants peuvent-ils voir le choix des autres ?
103 <label class=
"checkbox">
104 <input type=
"checkbox" name=
"public" {% if vote.is_public ==
1 %} checked {% endif %}
/>
105 Le vote est-il visible par tous ?
107 {% if not vote.is_terminated ==
1 %}
108 <label class=
"checkbox">
109 <input type=
"checkbox" name=
"anonymous" {% if vote.is_anonymous ==
1 %} checked {% endif %} disabled
/>
110 Les votes sont-ils anonymes ?
115 <div class=
"control-group">
116 <label class=
"control-label" for=
"value">Valeurs
</label>
117 <div class=
"controls">
118 <select name=
"value" id=
"value" disabled
>
119 <option>{{ values_ }}
</option>
127 <div class=
"control-group">
128 <label class=
"control-label" for=
"status">Statut
</label>
129 <div class=
"controls">
130 <select class=
"span2" name=
"status" id=
"status">
131 {% if vote.is_terminated ==
1 %}
132 <option>Fermé
</option>
133 <option>Ouvert
</option>
134 <option selected
>Terminé
</option>
136 {% if vote.is_open ==
1 %}
137 <option>Fermé
</option>
138 <option selected
>Ouvert
</option>
139 <option>Terminé
</option>
141 <option selected
>Fermé
</option>
142 <option>Ouvert
</option>
148 <div class=
"form-actions">
149 <input type=
"submit" class=
"btn btn-primary" value=
"Enregistrer" />
150 <input type=
"reset" class=
"btn" value=
"Annuler" />
156 {% if not vote.is_terminated ==
1%}
157 <div class=
"span5 well pull-right">
158 <fieldset><legend>Choix
</legend>
159 <table class=
"table table-stripped table-condensed">
167 {% for choice in choices %}
169 <form action=
"{{ url_for('admin_vote_editchoice', voteid=vote.id, choiceid=choice.id) }}" method=
"post">
170 <td><input type=
"text" name=
"title" value=
"{{ choice.name }}" /></td>
171 <td><input type=
"submit" class=
"btn btn-small" value=
"Sauver" />
172 <a href=
"#delete{{ choice.id }}" data-toggle=
"modal" class=
"btn btn-danger btn-small">Supprimer
</a></td>
175 <div class=
"modal hide fade" id=
"delete{{ choice.id }}">
176 <div class=
"modal-header">
177 <button type=
"button" class=
"close" data-dismiss=
"modal">×
</button>
178 <h3>Suppression d'un choix
</h3>
180 <div class=
"modal-body">
181 <p>Voulez-vous vraiment supprimer le choix « {{ choice.name }} » ?
</p>
183 <div class=
"modal-footer">
184 <a href=
"{{ url_for('admin_vote_deletechoice', voteid=vote.id, choiceid=choice.id) }}" class=
"btn btn-danger">Confirmer
</a>
185 <a href=
"#" class=
"btn" data-dismiss=
"modal">Annuler
</a>
192 <form action=
"{{ url_for('admin_vote_addchoice', voteid=vote.id) }}" method=
"post">
193 <td><input type=
"text" name=
"title" value=
"Nouveau choix"
194 onfocus=
"if(this.value=='Nouveau choix')this.value='';"
195 onblur=
"if(this.value=='')this.value='Nouveau choix';" /></td>
196 <td><input type=
"submit" class=
"btn btn-small btn-primary" value=
"+ Ajouter" />
205 <div class=
"span5 well pull-right">
206 <fieldset><legend>Pièces jointes
</legend>
207 <table class=
"table table-stripped table-condensed">
215 {% for attachment in attachments %}
217 <td>{{ attachment.url }}
</td>
218 <td><a href=
"{{ url_for('admin_vote_deleteattachment', voteid=vote.id, attachmentid=attachment.id) }}" class=
"btn btn-small btn-danger">Supprimer
</a></td>
224 <form action=
"{{ url_for('admin_vote_addattachment', voteid=vote.id) }}" method=
"post">
225 <td><input type=
"text" name=
"url" value=
"Nouveau document"
226 onfocus=
"if(this.value=='Nouveau document')this.value='';"
227 onblur=
"if(this.value=='')this.value='Nouveau document';" /></td>
228 <td><input type=
"submit" class=
"btn btn-small btn-primary" value=
"+ Ajouter" />