diff --git a/plugins/poll/assets/javascripts/controllers/poll.js.es6 b/plugins/poll/assets/javascripts/controllers/poll.js.es6 index fe820beaa61..c015c393f66 100644 --- a/plugins/poll/assets/javascripts/controllers/poll.js.es6 +++ b/plugins/poll/assets/javascripts/controllers/poll.js.es6 @@ -107,6 +107,11 @@ export default Ember.Controller.extend({ castVotesDisabled: Em.computed.not("canCastVotes"), + @computed("castVotesDisabled") + castVotesButtonClass(castVotesDisabled) { + return `cast-votes ${castVotesDisabled ? '' : 'btn-primary'}`; + }, + @computed("loading", "post.user_id", "post.topic.archived") canToggleStatus(loading, userId, topicArchived) { return this.currentUser && diff --git a/plugins/poll/assets/javascripts/discourse/templates/poll.hbs b/plugins/poll/assets/javascripts/discourse/templates/poll.hbs index dc8c4159138..68603747587 100644 --- a/plugins/poll/assets/javascripts/discourse/templates/poll.hbs +++ b/plugins/poll/assets/javascripts/discourse/templates/poll.hbs @@ -41,7 +41,7 @@
{{#if isMultiple}} {{#unless hideResultsDisabled}} - {{d-button class="cast-votes" title="poll.cast-votes.title" label="poll.cast-votes.label" disabled=castVotesDisabled action="castVotes"}} + {{d-button class=castVotesButtonClass title="poll.cast-votes.title" label="poll.cast-votes.label" disabled=castVotesDisabled action="castVotes"}} {{/unless}} {{/if}}