Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose: Open send later modal when user accepts the warning on scheduling message.
Lalit577c150ffa07
diff --git a/web/src/compose.js b/web/src/compose.jsindex f9bc53d8f24..1eacf7a54ac 100644--- a/web/src/compose.js+++ b/web/src/compose.js@@ -480,6 +480,13 @@ export function initialize() {compose_validate.set_user_acknowledged_wildcard_flag(true);if (is_edit_input) {message_edit.save_message_row_edit($row);+ } else if (event.target.dataset.validationTrigger === "schedule") {+ popover_menus.open_send_later_menu();++ // We need to set this flag to true here because `open_send_later_menu` validates the message and sets+ // the user acknowledged wildcard flag back to 'false' and we don't want that to happen because then it+ // would again show the wildcard warning banner when we actually send the message from 'send-later' modal.+ compose_validate.set_user_acknowledged_wildcard_flag(true);} else {finish();}diff --git a/web/src/compose_validate.js b/web/src/compose_validate.jsindex 6ae63befced..e624c9c3a8b 100644--- a/web/src/compose_validate.js+++ b/web/src/compose_validate.js@@ -251,6 +251,7 @@ function show_wildcard_warnings(opts) {button_text,hide_close_button: true,classname,+ scheduling_message: opts.scheduling_message,});// only show one error for any number of @all or @everyone mentionsdiff --git a/web/templates/compose_banner/compose_banner.hbs b/web/templates/compose_banner/compose_banner.hbsindex 3ccc1790632..fd44ba63a5a 100644--- a/web/templates/compose_banner/compose_banner.hbs+++ b/web/templates/compose_banner/compose_banner.hbs@@ -9,7 +9,7 @@<div class="banner_content">{{> @partial-block}}</div>{{/if}}{{#if button_text}}- <button class="compose_banner_action_button{{#if hide_close_button}} right_edge{{/if}}" >{{button_text}}</button>+ <button class="compose_banner_action_button{{#if hide_close_button}} right_edge{{/if}}" {{#if scheduling_message}}data-validation-trigger="schedule"{{/if}}>{{button_text}}</button>{{/if}}{{#if hide_close_button}}{{!-- hide_close_button is null by default, and false if explicitly set as false. --}}