mirror of https://github.com/zulip/zulip.git
streams: Show error when trying to make a default stream private.
We show failure message in stream privacy modal when user tries to set a default stream as private.
This commit is contained in:
parent
1477416515
commit
8d783e9d46
|
@ -495,6 +495,8 @@ function change_stream_privacy(e) {
|
|||
const stream_id = $(e.target).data("stream-id");
|
||||
const sub = stream_data.get_sub_by_id(stream_id);
|
||||
const data = {};
|
||||
const stream_privacy_status = $(".stream-privacy-status");
|
||||
stream_privacy_status.hide();
|
||||
|
||||
const privacy_setting = $("#stream_privacy_modal input[name=privacy]:checked").val();
|
||||
const stream_post_policy = Number.parseInt(
|
||||
|
@ -560,7 +562,8 @@ function change_stream_privacy(e) {
|
|||
$("#stream_privacy_modal").remove();
|
||||
// The rest will be done by update stream event we will get.
|
||||
},
|
||||
error() {
|
||||
error(xhr) {
|
||||
ui_report.error(i18n.t("Failed"), xhr, stream_privacy_status);
|
||||
$("#change-stream-privacy-button").text(i18n.t("Try again"));
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<ul class="grey-box">
|
||||
<div class="alert stream-privacy-status"></div>
|
||||
<h4>{{t 'Who can access the stream?'}}
|
||||
{{> help_link_widget link="/help/stream-permissions" }}
|
||||
</h4>
|
||||
|
|
Loading…
Reference in New Issue