Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
b574b13d
Commit
b574b13d
authored
Nov 28, 2010
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
Added choice to notify no one
parent
5c5a72e6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
helios/forms.py
+2
-2
2 additions, 2 deletions
helios/forms.py
helios/views.py
+14
-11
14 additions, 11 deletions
helios/views.py
with
16 additions
and
13 deletions
helios/forms.py
+
2
−
2
View file @
b574b13d
...
...
@@ -30,5 +30,5 @@ class EmailVotersForm(forms.Form):
class
TallyNotificationEmailForm
(
forms
.
Form
):
subject
=
forms
.
CharField
(
max_length
=
80
)
body
=
forms
.
CharField
(
max_length
=
2000
,
widget
=
forms
.
Textarea
)
send_to
=
forms
.
ChoiceField
(
label
=
"
Send To
"
,
choices
=
[(
'
all
'
,
'
all voters
'
),
(
'
voted
'
,
'
only voters who cast a ballot
'
)])
body
=
forms
.
CharField
(
max_length
=
2000
,
widget
=
forms
.
Textarea
,
required
=
False
)
send_to
=
forms
.
ChoiceField
(
label
=
"
Send To
"
,
choices
=
[(
'
all
'
,
'
all voters
'
),
(
'
voted
'
,
'
only voters who cast a ballot
'
)
,
(
'
none
'
,
'
no one -- are you sure about this?
'
)
])
This diff is collapsed.
Click to expand it.
helios/views.py
+
14
−
11
View file @
b574b13d
...
...
@@ -886,6 +886,8 @@ def combine_decryptions(request, election):
'
election
'
:
election
}
# if the user opted for notifying no one, then we skip this step
if
email_form
.
cleaned_data
[
'
send_to
'
]
!=
'
none
'
:
# exclude those who have not voted
if
email_form
.
cleaned_data
[
'
send_to
'
]
==
'
voted
'
:
voter_constraints_exclude
=
{
'
vote_hash
'
:
None
}
...
...
@@ -901,6 +903,7 @@ def combine_decryptions(request, election):
# rapid short-message notification
# this inherently only applies to those who have voted (for the most part)
# and this is not configurable, this is ALWAYS sent
tasks
.
voters_notify
.
delay
(
election_id
=
election
.
id
,
notification_template
=
'
notification/result.txt
'
,
extra_vars
=
extra_vars
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment