mirror of https://github.com/zulip/zulip.git
streams: Consider only visible choices while selecting default choice.
We should only consider visible choices while selecting the default stream-privacy choice in stream creation form. Previously, we were only checking whether the option is disabled, but this resulted in a case where no option was selected when the realm-level setting was set to not allow web-public streams as the choice was only hidden and not disabled.
This commit is contained in:
parent
1049867485
commit
265a587470
|
@ -338,8 +338,8 @@ 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.
|
// Select the first visible and enabled choice for stream privacy.
|
||||||
$("#make-invite-only input:not([disabled]):first").prop("checked", true);
|
$("#make-invite-only input:visible:not([disabled]):first").prop("checked", true);
|
||||||
// Make the options default to the same each time:
|
// Make the options default to the same each time:
|
||||||
// "announce stream" on.
|
// "announce stream" on.
|
||||||
$("#stream_creation_form .stream-message-retention-days-input").hide();
|
$("#stream_creation_form .stream-message-retention-days-input").hide();
|
||||||
|
|
Loading…
Reference in New Issue