diff --git a/openslides/agenda/templates/agenda/edit.html b/openslides/agenda/templates/agenda/edit.html index 190665d1a..6eeca7a33 100644 --- a/openslides/agenda/templates/agenda/edit.html +++ b/openslides/agenda/templates/agenda/edit.html @@ -27,7 +27,7 @@ {%trans 'Save' %} + + + + - - -

-
- - - - - {% endif %} + + + {% endblock %} diff --git a/openslides/application/views.py b/openslides/application/views.py index 8053ce6da..340d7c621 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -287,12 +287,11 @@ def gen_poll(request, application_id): gen a poll for this application. """ try: - count = Poll.objects.filter(application=application_id).count() - Application.objects.get(pk=application_id).gen_poll(user=request.user, pollcount=count+1) - messages.success(request, _("New poll was successfully created.") ) + poll = Application.objects.get(pk=application_id).gen_poll(user=request.user) + messages.success(request, _("New vote was successfully created.") ) except Application.DoesNotExist: pass - return redirect(reverse('application_view', args=[application_id])) + return redirect(reverse('application_poll_view', args=[poll.id])) @permission_required('application.can_manage_application') @@ -311,7 +310,7 @@ def delete_poll(request, poll_id): return redirect(reverse('application_view', args=[application.id])) -@permission_required('application.can_view_poll') +@permission_required('application.can_manage_application') @template('application/poll_view.html') def view_poll(request, poll_id): """ @@ -320,7 +319,7 @@ def view_poll(request, poll_id): poll = Poll.objects.get(pk=poll_id) ballot = poll.ballot options = poll.options - if request.user.has_perm('application.can_manage_applications'): + if request.user.has_perm('application.can_manage_application'): if request.method == 'POST': form = PollForm(request.POST, prefix="poll") if form.is_valid(): @@ -337,6 +336,9 @@ def view_poll(request, poll_id): option.voteundesided = option.form. \ cleaned_data['undesided'] or 0 option.save() + messages.success(request, _("Votes are successfully saved.") ) + if not 'apply' in request.POST: + return redirect(reverse('application_view', args=[poll.application.id])) else: form = PollForm(initial={'invalid': poll.votesinvalid, 'votescast': poll.votescast}, prefix="poll") for option in options: diff --git a/openslides/assignment/templates/assignment/edit.html b/openslides/assignment/templates/assignment/edit.html index 08a614377..b076aa02a 100644 --- a/openslides/assignment/templates/assignment/edit.html +++ b/openslides/assignment/templates/assignment/edit.html @@ -14,6 +14,9 @@ + - - -

- {% endif %} + +

+ + + + + +

{% endblock %} diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index 4d7873769..4a41cae92 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -108,6 +108,7 @@ def edit(request, assignment_id=None): messages.success(request, _('New election was successfully created.')) else: messages.success(request, _('Election was successfully modified.')) + if not 'apply' in request.POST: return redirect(reverse("assignment_overview")) else: form = AssignmentForm(instance=assignment) @@ -188,7 +189,7 @@ def gen_poll(request, assignment_id): return redirect(reverse('assignment_poll_view', args=[poll.id])) -@permission_required('assignment.can_view_assignment') +@permission_required('assignment.can_manage_assignment') @template('assignment/poll_view.html') def poll_view(request, poll_id): poll = Poll.objects.get(pk=poll_id) @@ -214,6 +215,8 @@ def poll_view(request, poll_id): success = success + 1 if success == options.count(): messages.success(request, _("Votes are successfully saved.") ) + if not 'apply' in request.POST: + return redirect(reverse('assignment_view', args=[assignment.id])) else: form = PollForm(initial={'invalid': poll.votesinvalid, 'votescast': poll.votescast}, prefix="poll") for option in options: diff --git a/openslides/static/styles/base.css b/openslides/static/styles/base.css index 40d225a2c..d5e3f3540 100644 --- a/openslides/static/styles/base.css +++ b/openslides/static/styles/base.css @@ -252,6 +252,7 @@ table a.table_edit { } tr.total td { border-top: 1px solid #333333; + background-color: #e3e3e3; } @@ -411,7 +412,7 @@ button .stop{ .errorlist { color:#DA3939; - font-size:10px; + font-size:9px; font-style:italic; height:16px; padding:0; diff --git a/openslides/templates/403.html b/openslides/templates/403.html index ebd1bb19e..99ea3fbdc 100644 --- a/openslides/templates/403.html +++ b/openslides/templates/403.html @@ -15,10 +15,6 @@
  • {%trans "Elections" %}
  • {% endif %} - {% if perms.poll.can_view_poll or perms.poll.can_manage_poll %} -
  • - {%trans "Polls" %}
  • - {% endif %} {% if perms.participant.can_view_participants or perms.participant.can_manage_participants %}
  • {%trans "Participants" %}
  • diff --git a/openslides/templates/404.html b/openslides/templates/404.html index 972b12820..207553df0 100644 --- a/openslides/templates/404.html +++ b/openslides/templates/404.html @@ -15,10 +15,6 @@
  • {%trans "Elections" %}
  • {% endif %} - {% if perms.poll.can_view_poll or perms.poll.can_manage_poll %} -
  • - {%trans "Polls" %}
  • - {% endif %} {% if perms.participant.can_view_participants or perms.participant.can_manage_participants %}
  • {%trans "Participants" %}
  • diff --git a/openslides/templates/500.html b/openslides/templates/500.html index 9c64131d7..fdb3fafc4 100644 --- a/openslides/templates/500.html +++ b/openslides/templates/500.html @@ -15,10 +15,6 @@
  • {%trans "Elections" %}
  • {% endif %} - {% if perms.poll.can_view_poll or perms.poll.can_manage_poll %} -
  • - {%trans "Polls" %}
  • - {% endif %} {% if perms.participant.can_view_participants or perms.participant.can_manage_participants %}
  • {%trans "Participants" %}