Commit c8fae39f authored by Sli's avatar Sli
Browse files

Merge branch 'elections' into 'master'

Avoid moving role order in election by reloading page

See merge request ae/Sith!136
parents bc7cfc2d 4217b929
Pipeline #1428 passed with stage
in 6 minutes and 6 seconds
......@@ -280,7 +280,7 @@ th {
<tbody data-max-choice="{{role.max_choice}}" class="role{{ ' role_error' if role.title in election_form.errors else '' }}{{ ' role__multiple-choices' if role.max_choice > 1 else ''}}">
<tr class="role__title">
<td colspan="{{ election_lists.count() + 1 }}">
<span>{{ role.title }}</span>
<span><b>{{ role.title }}</b></span>
{% if user.can_edit(role) and election.is_vote_editable -%}
<a href="{{url('election:update_role',}}">{% trans %}Edit{% endtrans %}</a>
<a href="{{url('election:delete_role',}}">{% trans %}Delete{% endtrans %}</a>
......@@ -7,6 +7,7 @@ from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import PermissionDenied
from django.db import transaction
from django.forms import CheckboxSelectMultiple
from django.shortcuts import redirect
from django import forms
from core.views import CanViewMixin, CanEditMixin, CanCreateMixin
......@@ -192,6 +193,7 @@ class ElectionDetailView(CanViewMixin, DetailView):
elif action == "top":
return redirect(reverse_lazy('election:detail', kwargs={'election_id':}))
return r
def get_context_data(self, **kwargs):
Supports Markdown
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