diff --git a/adhocracy4/polls/static/PollDashboard/EditPollManagement.jsx b/adhocracy4/polls/static/PollDashboard/EditPollManagement.jsx index a9bf96585..0e37b0586 100644 --- a/adhocracy4/polls/static/PollDashboard/EditPollManagement.jsx +++ b/adhocracy4/polls/static/PollDashboard/EditPollManagement.jsx @@ -13,6 +13,13 @@ import api from '../../../static/api' import Alert from '../../../static/Alert' +const translated = { + votingOptionsSectionTitle: django.gettext('Voting Options'), + allowUnregisteredUsersLabel: django.gettext('Allow unregistered users to vote'), + allowUnregisteredUsersSR: django.gettext('Enable this option to allow users who are not registered to participate in the voting process.'), + addAndEditSectionTitle: django.gettext('Add and Edit Questions') +} + // | Helper method for local scoped key/identifier let maxLocalKey = 0 @@ -209,17 +216,32 @@ export const EditPollManagement = (props) => { className="editpoll__questions" > {props.enableUnregisteredUsers && -
- - setAllowUnregisteredUsers((state) => !state)} checked={allowUnregisteredUsers} /> -
} - - { - questions.map((question, index, arr) => { - const key = question.id || question.key - return question.is_open - ? ( -
+
+

{translated.votingOptionsSectionTitle}

+
+ setAllowUnregisteredUsers((state) => !state)} + checked={allowUnregisteredUsers} + aria-describedby="votingDescription" + /> + +

+ {translated.allowUnregisteredUsersSR} +

+
+
} +
+

{translated.addAndEditSectionTitle}

+ + { + questions.map((question, index, arr) => { + const key = question.id || question.key + return question.is_open + ? ( { onDelete={() => handleQuestionDelete(index)} errors={errors && errors[index] ? errors[index] : {}} /> -
- ) - : ( -
+ ) + : ( { onDeleteChoice={(choiceIndex) => handleChoiceDelete(index, choiceIndex)} onAppendChoice={(hasOtherOption) => handleChoiceAppend(index, hasOtherOption)} /> -
- ) - }) - } -
- + ) + }) + } + + removeAlert()} {...alert} />
diff --git a/changelog/8462.md b/changelog/8462.md index 34beeaed3..bcceb732a 100644 --- a/changelog/8462.md +++ b/changelog/8462.md @@ -1,6 +1,7 @@ ### Added - Added PollDetail/TextareaWithCounter.jsx and PollDetail/ChoiceRow.jsx +- `Voting Options` section to PollDashboard/EditPollManagement.jsx ### Changed - Renamed and refactored PollDetail/PollQuestion.jsx into PollDetail/PollChoice.jsx