diff --git a/js/src/forum/components/PollView.tsx b/js/src/forum/components/PollView.tsx index 29a0b0d9..4dbde13c 100644 --- a/js/src/forum/components/PollView.tsx +++ b/js/src/forum/components/PollView.tsx @@ -46,36 +46,42 @@ export default class PollView extends Component { createMainView(): ItemList { const items = new ItemList(); const poll = this.attrs.poll; + items.add('title',

{poll.question()}

); items.add('subtitle',

{poll.subtitle()}

); - items.add('form', this.createFormView()); + items.add('form',
{this.createFormItems().toArray()}
); + return items; } - createFormView(): Mithril.Children { + createFormItems(): ItemList { const state = this.state; + const items = new ItemList(); const poll = this.attrs.poll; const infoItems = this.infoItems(poll.maxVotes()); - return ( -
-
- Antworten - -
-
- {!infoItems.isEmpty() &&
{infoItems.toArray()}
} - -
-
+ items.add( + 'elements', +
+ app.translator.trans('fof-polls.forum.answers') + +
); + items.add( + 'sticky', +
+ {!infoItems.isEmpty() &&
{infoItems.toArray()}
} + +
+ ); + return items; } deletePoll(): void { diff --git a/resources/locale/en.yml b/resources/locale/en.yml index 0be29674..243a20ec 100755 --- a/resources/locale/en.yml +++ b/resources/locale/en.yml @@ -23,6 +23,7 @@ fof-polls: max_votes_allowed: "Poll allows voting for {max, plural, one {# option} other {# options}}." polls_count: "{count, plural, one { {count} vote} other {{count} votes}}" poll_never_ends: Poll never ends + answers: Answers poll: cannot_change_vote: You cannot change your vote after voting.