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.

create stream: Improve click handler for Create.

Steve Howell67fe78271406
diff --git a/frontend_tests/puppeteer_tests/subscriptions.ts b/frontend_tests/puppeteer_tests/subscriptions.ts
index 138b6d14440..67a60ac2288 100644
--- a/frontend_tests/puppeteer_tests/subscriptions.ts
+++ b/frontend_tests/puppeteer_tests/subscriptions.ts
@@ -175,7 +175,7 @@ async function create_stream(page: Page): Promise<void> {
await wait_for_checked(page, "cordelia", true);
await wait_for_checked(page, "desdemona", true); // Add desdemona back as we did unset all in last test.
await wait_for_checked(page, "othello", false);
- await page.click("form#stream_creation_form button.button.sea-green");
+ await page.click("form#stream_creation_form .finalize_create_stream");
await page.waitForFunction(() => $(".stream-name").is(':contains("Puppeteer")'));
const stream_name = await common.get_text_from_selector(
page,
diff --git a/static/js/stream_create.js b/static/js/stream_create.js
index 6d9d5beff09..cd7f8073a9d 100644
--- a/static/js/stream_create.js
+++ b/static/js/stream_create.js
@@ -446,7 +446,7 @@ export function set_up_handlers() {
container.on("change", "#make-invite-only input", update_announce_stream_state);
- container.on("submit", "#stream_creation_form", (e) => {
+ container.on("click", ".finalize_create_stream", (e) => {
e.preventDefault();
clear_error_display();
diff --git a/static/templates/stream_settings/stream_creation_form.hbs b/static/templates/stream_settings/stream_creation_form.hbs
index 2f823af094f..5a59526155b 100644
--- a/static/templates/stream_settings/stream_creation_form.hbs
+++ b/static/templates/stream_settings/stream_creation_form.hbs
@@ -55,7 +55,7 @@
</div>
<div class="modal-footer">
<button class="button small white rounded" data-dismiss="modal">{{t "Cancel" }}</button>
- <button class="button small sea-green rounded" type="submit">{{t "Create" }}</button>
+ <button class="finalize_create_stream button small sea-green rounded" type="submit">{{t "Create" }}</button>
</div>
</form>
</div>