mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
create stream: Fix widget for changing privacy doesn't render initially.
When admin user create new private stream, widget for changing privacy of stream doesn't render. Because we render subscription-settings template partially on subscription-add event, so this case wasn't handled. Fixes #9469
This commit is contained in:
committed by
Tim Abbott
parent
562f5387e3
commit
3422766c25
@@ -263,6 +263,10 @@ exports.update_settings_for_subscribed = function (sub) {
|
|||||||
|
|
||||||
button.toggleClass("checked");
|
button.toggleClass("checked");
|
||||||
settings_button.text(i18n.t("Unsubscribe"));
|
settings_button.text(i18n.t("Unsubscribe"));
|
||||||
|
|
||||||
|
if (sub.can_change_stream_permissions) {
|
||||||
|
$(".change-stream-privacy").show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
exports.add_sub_to_table(sub);
|
exports.add_sub_to_table(sub);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,7 @@
|
|||||||
<div class="subscription-type-text">
|
<div class="subscription-type-text">
|
||||||
{{partial "subscription_type"}}
|
{{partial "subscription_type"}}
|
||||||
</div>
|
</div>
|
||||||
{{#if can_change_stream_permissions}}
|
<a class="change-stream-privacy" {{#unless can_change_stream_permissions}}style="display: none;"{{/unless}}>[{{t "Change" }}]</a>
|
||||||
<a class="change-stream-privacy">[{{t "Change" }}]</a>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="regular_subscription_settings collapse {{#subscribed}}in{{/subscribed}}">
|
<div class="regular_subscription_settings collapse {{#subscribed}}in{{/subscribed}}">
|
||||||
<div class="subscription-config">
|
<div class="subscription-config">
|
||||||
|
|||||||
Reference in New Issue
Block a user