Skip to content
Snippets Groups Projects
Commit f568059d authored by Lukáš Nový's avatar Lukáš Nový
Browse files

Allow to restrict election by time

parent f330cdd5
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,8 @@ Forms for Helios
from django import forms
from models import Election
from widgets import *
from fields import *
#from widgets import *
#from fields import *
from django.conf import settings
......@@ -19,6 +19,10 @@ class ElectionForm(forms.Form):
randomize_answer_order = forms.BooleanField(required=False, initial=False, help_text='enable this if you want the answers to questions to appear in random order for each voter')
private_p = forms.BooleanField(required=False, initial=False, label="Private?", help_text='A private election is only visible to registered voters.')
help_email = forms.CharField(required=False, initial="", label="Help Email Address", help_text='An email address voters should contact if they need help.')
voting_starts_at = forms.SplitDateTimeField(help_text = 'UTC date and time when voting begins',
widget=forms.SplitDateTimeWidget, required=False)
voting_ends_at = forms.SplitDateTimeField(help_text = 'UTC date and time when voting ends',
widget=forms.SplitDateTimeWidget, required=False)
if settings.ALLOW_ELECTION_INFO_URL:
election_info_url = forms.CharField(required=False, initial="", label="Election Info Download URL", help_text="the URL of a PDF document that contains extra election information, e.g. candidate bios and statements")
......@@ -26,10 +30,11 @@ class ElectionForm(forms.Form):
class ElectionTimesForm(forms.Form):
# times
voting_starts_at = SplitDateTimeField(help_text = 'UTC date and time when voting begins',
widget=SplitSelectDateTimeWidget)
voting_ends_at = SplitDateTimeField(help_text = 'UTC date and time when voting ends',
widget=SplitSelectDateTimeWidget)
# voting_starts_at = forms.SplitDateTimeField(help_text = 'UTC date and time when voting begins',
# widget=SplitSelectDateTimeWidget)
# voting_ends_at = forms.SplitDateTimeField(help_text = 'UTC date and time when voting ends',
# widget=SplitSelectDateTimeWidget)
pass
class EmailVotersForm(forms.Form):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment