Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stream_edit: Be more specific w/ ".stream_message_retention_setting".

YashRE426b370fee8a69
diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js
index 8b6e893b449..9e53a6ece99 100644
--- a/static/js/stream_edit.js
+++ b/static/js/stream_edit.js
@@ -140,9 +140,9 @@ export function get_display_text_for_realm_message_retention_setting() {
function change_stream_message_retention_days_block_display_property(value) {
if (value === "retain_for_period") {
- $(".stream-message-retention-days-input").show();
+ $("#stream_privacy_modal .stream-message-retention-days-input").show();
} else {
- $(".stream-message-retention-days-input").hide();
+ $("#stream_privacy_modal .stream-message-retention-days-input").hide();
}
}
@@ -154,7 +154,7 @@ function set_stream_message_retention_setting_dropdown(stream) {
value = "unlimited";
}
- $(".stream_message_retention_setting").val(value);
+ $("#stream_privacy_modal .stream_message_retention_setting").val(value);
change_stream_message_retention_days_block_display_property(value);
}
@@ -789,7 +789,7 @@ export function initialize() {
$("#stream_privacy_modal .dialog_submit_button").attr("data-stream-id", stream_id);
set_stream_message_retention_setting_dropdown(stream);
- $(".stream_message_retention_setting").on("change", (e) => {
+ $("#stream_privacy_modal .stream_message_retention_setting").on("change", (e) => {
const dropdown_value = e.target.value;
change_stream_message_retention_days_block_display_property(dropdown_value);
});