Commit bc1dd3fa authored by chris's avatar chris

simplifications formulaires

parent 12067fa3
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-06-23 19:07+0200\n"
"POT-Creation-Date: 2010-06-23 22:43+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -16,6 +16,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: sondage/models.py:44
msgid "your name"
msgstr "votre nom"
#: templates/base.html:7
msgid "Easy poll sharing"
msgstr "rendez-vous partagés"
......@@ -93,8 +97,8 @@ msgid ""
"Provide possible dates for your meeting. You may add details as meeting "
"hours, places, or else."
msgstr ""
"Proposez quelques dates pour votre rendez-vous. Vous pouvez ajouter "
"l'heure, le lieu ou autre dans le champ \"détails\"."
"Proposez quelques dates pour votre rendez-vous. Vous pouvez ajouter l'heure, "
"le lieu ou autre dans le champ \"détails\"."
#: templates/sondage/poll_detail.html:9
msgid "Posted by"
......@@ -112,7 +116,7 @@ msgstr "Adresse partagée"
msgid "Point colums to see choice details and comments"
msgstr "Pointez les colonnes pour faire apparaître les détails"
#: templates/sondage/poll_detail.html:89
#: templates/sondage/poll_detail.html:87
msgid ""
"Check the boxes for positive answers, you may provide a comment for each "
"choice"
......
No preview for this file type
......@@ -21,7 +21,6 @@ class BulletinForm(forms.ModelForm):
class VoteForm(forms.ModelForm):
comment = forms.CharField(required=False,max_length=80,widget=forms.TextInput(attrs={'class':'comment'}))
choice = forms.CharField()
voter = forms.CharField(required=False)
class Meta:
model = Vote
fields = ('choice','voice','comment')
......
from django.db import models
import os
from django.db import models
from django.utils.translation import ugettext_lazy as _
from binascii import hexlify
def _createId():
......@@ -40,7 +41,7 @@ class NodateChoice(models.Model):
class Bulletin(models.Model):
poll = models.ForeignKey(Poll,editable=False)
voter = models.CharField("",max_length=40)
voter = models.CharField(_('Your name'),max_length=40)
def __unicode__(self):
return self.voter
......
......@@ -234,7 +234,7 @@ def vote(request, poll_id):
except:
pass
else:
voter = 'your name'
#voter = 'your name'
error_message = "Login let you modify your vote anytime."
key = 'has_voted-' + poll.id
if request.session.get(key, False):
......@@ -255,7 +255,8 @@ def vote(request, poll_id):
except:
pass
form = BulletinForm(instance=poll,initial={'voter': voter})
#form = BulletinForm(instance=poll,initial={'voter': voter})
form = BulletinForm(instance=poll)
current_site = settings.SITE + poll.id
return render_to_response('sondage/poll_detail.html', {'object': poll, 'form': form, 'vforms':vforms, 'error_message':error_message, 'current_site': current_site}, context_instance=RequestContext(request))
......
......@@ -58,9 +58,7 @@
<tr><td class='names' title="Fill in your name">
{{ form.management_form }}
{{ form.voter }}
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
{{ form.as_p }}
</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment