Debug
[cavote.git] / templates / vote.html
index 8d6e9dd..44469ad 100644 (file)
@@ -14,7 +14,7 @@
       {% for choice in choices %}
       <th>{{ choice.name }}</th>
       {% endfor %}
-      {% if 'user' in 'session' %}
+      {% if 'user' in session %}
       <th></th>
       {% endif %}
     </tr>
@@ -31,7 +31,7 @@
       {% else %}
       <td class="no"></td>{% endif %}
       {% endfor %}
-      {% if 'user' in 'session' %}
+      {% if 'user' in session %}
       <td>{% if user.userid == session.user.id %}<a href="{{ url_for('vote_deletechoices', idvote=vote.id, iduser=session.user.id) }}" class="btn btn-mini btn-danger" title="Supprimer"><i class="icon-remove icon-white"></a>{% endif %}</td>
       {% endif %}
     </tr>
       <th><input type='text' name="username" value='{{ session.user.name }}' disabled /></th>
       {% if vote.is_multiplechoice %}
       {% for choice in choices %}
-      <td><input type='checkbox' name="{{ choice.id }}" /></td>
+      <td><input type='checkbox' name="{{ choice.id }}" value="{{ choice.id }}" /></td>
       {% endfor %}
       {% else %}
       {% for choice in choices %}
-      <td><input type='radio' name="{{ choice.id }}" /></td>
+      <td><input type='radio' name="choice" value="{{ choice.id }}" /></td>
       {% endfor %}
       {% endif %}
       <td><input type="submit" class="btn btn-primary" value="OK" /></td>
@@ -64,7 +64,7 @@
       {% for choice in choices %}
       <td>{{ choice.nb }}</td>
       {% endfor %}
-      {% if 'user' in 'session' %}
+      {% if 'user' in session %}
       <td></td>
       {% endif %}
     </tr>