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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
a0347e28
Commit
a0347e28
authored
14 years ago
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
clarified ability to add new voters on admin side if reg is open
parent
5086256d
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/templates/voters_list.html
+1
-1
1 addition, 1 deletion
helios/templates/voters_list.html
helios/views.py
+4
-1
4 additions, 1 deletion
helios/views.py
with
5 additions
and
2 deletions
helios/templates/voters_list.html
+
1
−
1
View file @
a0347e28
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<br
/>
<br
/>
{% if admin_p and upload_p %}
{% if admin_p and upload_p %}
<p>
<p>
{% if not election.frozen_at %}
{% if
election.openreg or
not election.frozen_at %}
<a
href=
"{% url helios.views.voters_upload election_uuid=election.uuid %}"
>
bulk upload voters
</a>
<a
href=
"{% url helios.views.voters_upload election_uuid=election.uuid %}"
>
bulk upload voters
</a>
{% endif %}
{% endif %}
</p>
</p>
...
...
This diff is collapsed.
Click to expand it.
helios/views.py
+
4
−
1
View file @
a0347e28
...
@@ -879,7 +879,7 @@ def voters_list_pretty(request, election):
...
@@ -879,7 +879,7 @@ def voters_list_pretty(request, election):
'
upload_p
'
:
helios
.
VOTERS_UPLOAD
,
'
q
'
:
q
,
'
upload_p
'
:
helios
.
VOTERS_UPLOAD
,
'
q
'
:
q
,
'
voter_files
'
:
voter_files
})
'
voter_files
'
:
voter_files
})
@election_admin
(
frozen
=
False
)
@election_admin
()
def
voters_upload
(
request
,
election
):
def
voters_upload
(
request
,
election
):
"""
"""
Upload a CSV of password-based voters with
Upload a CSV of password-based voters with
...
@@ -887,6 +887,9 @@ def voters_upload(request, election):
...
@@ -887,6 +887,9 @@ def voters_upload(request, election):
name and email are needed only if voter_type is static
name and email are needed only if voter_type is static
"""
"""
if
election
.
frozen_at
and
not
election
.
openreg
:
raise
PermissionDenied
()
if
request
.
method
==
"
GET
"
:
if
request
.
method
==
"
GET
"
:
return
render_template
(
request
,
'
voters_upload
'
,
{
'
election
'
:
election
})
return
render_template
(
request
,
'
voters_upload
'
,
{
'
election
'
:
election
})
...
...
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