mirror of https://github.com/zulip/zulip.git
widgets: Hide edit question icon in poll widget for non-author users.
If a non-author user clicked on view source in a poll and then close it, the edit question icon would incorrectly get visible. This made changing the question in local echo possible for non-author users. Fixes: #14299
This commit is contained in:
parent
12474a3deb
commit
51a8873579
|
@ -318,14 +318,14 @@ exports.MessageList.prototype = {
|
||||||
|
|
||||||
show_edit_topic: function MessageList_show_edit_topic(recipient_row, form) {
|
show_edit_topic: function MessageList_show_edit_topic(recipient_row, form) {
|
||||||
recipient_row.find(".topic_edit_form").empty().append(form);
|
recipient_row.find(".topic_edit_form").empty().append(form);
|
||||||
recipient_row.find('.fa-pencil').hide();
|
recipient_row.find('.edit_content_button').hide();
|
||||||
recipient_row.find(".stream_topic").hide();
|
recipient_row.find(".stream_topic").hide();
|
||||||
recipient_row.find(".topic_edit").show();
|
recipient_row.find(".topic_edit").show();
|
||||||
},
|
},
|
||||||
|
|
||||||
hide_edit_topic: function MessageList_hide_edit_topic(recipient_row) {
|
hide_edit_topic: function MessageList_hide_edit_topic(recipient_row) {
|
||||||
recipient_row.find(".stream_topic").show();
|
recipient_row.find(".stream_topic").show();
|
||||||
recipient_row.find('.fa-pencil').show();
|
recipient_row.find('.edit_content_button').show();
|
||||||
recipient_row.find(".topic_edit").hide();
|
recipient_row.find(".topic_edit").hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue