diff --git a/CHANGELOG b/CHANGELOG index f75403a58..0c507f8f6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -76,6 +76,7 @@ Elections: - Candidates are now sortable. - Removed unused assignment config to publish winner election results only. - Number of ballots printed can now be set in config. +- Added inline edit field for a specific hint on ballot papers. Users: - Added new matrix-interface for managing groups and their permissions. diff --git a/openslides/assignments/static/js/assignments/site.js b/openslides/assignments/static/js/assignments/site.js index 0f103511b..578f1b9a2 100644 --- a/openslides/assignments/static/js/assignments/site.js +++ b/openslides/assignments/static/js/assignments/site.js @@ -205,7 +205,8 @@ angular.module('OpenSlidesApp.assignments.site', [ 'MajorityMethodChoices', 'Config', 'AssignmentPollDetailCtrlCache', - function ($scope, MajorityMethodChoices, Config, AssignmentPollDetailCtrlCache) { + 'AssignmentPoll', + function ($scope, MajorityMethodChoices, Config, AssignmentPollDetailCtrlCache, AssignmentPoll) { // Define choices. $scope.methodChoices = MajorityMethodChoices; // TODO: Get $scope.baseChoices from config_variables.py without copying them. @@ -228,6 +229,10 @@ angular.module('OpenSlidesApp.assignments.site', [ }; $scope.recalculateMajorities($scope.method); + $scope.saveDescriptionChange = function (poll) { + AssignmentPoll.save(poll); + }; + // Save current values to cache on destroy of this controller. $scope.$on('$destroy', function() { AssignmentPollDetailCtrlCache[$scope.poll.id] = { @@ -814,15 +819,6 @@ angular.module('OpenSlidesApp.assignments.site', [ label: gettextCatalog.getString('Casted ballots'), type: 'number' } - }, - // TODO: update description in separat request - // (without vote result values) - { - key: 'description', - type: 'input', - templateOptions: { - label: gettextCatalog.getString('Comment on the ballot paper') - } } ); diff --git a/openslides/assignments/static/templates/assignments/assignment-detail.html b/openslides/assignments/static/templates/assignments/assignment-detail.html index b764ce52e..b41c4ac30 100644 --- a/openslides/assignments/static/templates/assignments/assignment-detail.html +++ b/openslides/assignments/static/templates/assignments/assignment-detail.html @@ -133,7 +133,13 @@ index="$index" heading="{{ 'Ballot' | translate }} {{ assignment.polls.length - $index }}">
-
+
+ + Set hint for ballot paper ... + {{ poll.description }} + + Delete
-
+