create stream: Fix announce_stream isn't disabled in create-private-stream.

Currently in create new stream form, announce_stream option isn't get
disabled for private stream with public history.
This commit fixes the above issue.
This commit is contained in:
Yashashvi Dave
2018-08-04 11:08:25 +05:30
committed by Tim Abbott
parent 5bfe24beef
commit 6a382f332e

View File

@@ -146,7 +146,8 @@ function update_announce_stream_state() {
var announce_stream_checkbox = $('#announce-new-stream input');
var announce_stream_label = $('#announce-new-stream');
var disable_it = false;
var is_invite_only = $('input:radio[name=privacy]:checked').val() === 'invite-only';
var privacy_type = $('input:radio[name=privacy]:checked').val();
var is_invite_only = privacy_type === "invite-only" || privacy_type === "invite-only-public-history";
announce_stream_label.removeClass("control-label-disabled");
if (is_invite_only) {