poll widget: Only show "Add option" if a question has been set.

This makes the UI less confusing.
This commit is contained in:
Tim Abbott
2018-12-16 11:53:36 -08:00
parent 5d31c57638
commit 728c601ff4
2 changed files with 7 additions and 0 deletions

View File

@@ -202,6 +202,9 @@ exports.activate = function (opts) {
}
if (widget_data.question !== '') {
elem.find('button.poll-question').text(i18n.t('Edit question'));
elem.find('.poll-comment-bar').show();
} else {
elem.find('.poll-comment-bar').hide();
}
elem.find("button.poll-vote").on('click', function (e) {