mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
stream_create: Select the first enabled choice by default.
We select the first enabled radio button by default instead of selecting "Public" because there can be case when a user is allowed to create a private-stream only and the other options are disabled in that case after some recent changes.
This commit is contained in:
@@ -338,9 +338,10 @@ export function show_new_stream_modal() {
|
|||||||
html_selector: (user) => $(`#${CSS.escape("user_checkbox_" + user.user_id)}`),
|
html_selector: (user) => $(`#${CSS.escape("user_checkbox_" + user.user_id)}`),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Select the first enabled choice for stream privacy.
|
||||||
|
$("#make-invite-only input:not([disabled]):first").prop("checked", true);
|
||||||
// Make the options default to the same each time:
|
// Make the options default to the same each time:
|
||||||
// public, "announce stream" on.
|
// "announce stream" on.
|
||||||
$("#make-invite-only input:radio[value=public]").prop("checked", true);
|
|
||||||
$("#stream_creation_form .stream-message-retention-days-input").hide();
|
$("#stream_creation_form .stream-message-retention-days-input").hide();
|
||||||
$("#stream_creation_form select[name=stream_message_retention_setting]").val("realm_default");
|
$("#stream_creation_form select[name=stream_message_retention_setting]").val("realm_default");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user