mirror of https://github.com/zulip/zulip.git
stream: Change button text to "Close" in copy email address modal.
This commit changes the button text from "Cancel" to "Close" in copy email address modal, since it is weird to click on "Cancel" button after having copied the email address and might confuse users. Using "Close" makes it clear that the button is to just close the modal.
This commit is contained in:
parent
c77c78f147
commit
8db9093d0b
|
@ -48,6 +48,7 @@ export type DialogWidgetConfig = {
|
|||
html_body: string;
|
||||
on_click: (e: unknown) => void;
|
||||
html_submit_button?: string;
|
||||
html_exit_button?: string;
|
||||
close_on_submit?: boolean;
|
||||
focus_submit_on_open?: boolean;
|
||||
help_link?: string;
|
||||
|
@ -112,6 +113,7 @@ export function launch(conf: DialogWidgetConfig): void {
|
|||
|
||||
// Optional parameters:
|
||||
// * html_submit_button: Submit button text.
|
||||
// * html_exit_button: Exit button text.
|
||||
// * close_on_submit: Whether to close modal on clicking submit.
|
||||
// * focus_submit_on_open: Whether to focus submit button on open.
|
||||
// * help_link: A help link in the heading area.
|
||||
|
@ -130,10 +132,12 @@ export function launch(conf: DialogWidgetConfig): void {
|
|||
// on valid input change in modal.
|
||||
|
||||
const html_submit_button = conf.html_submit_button ?? $t_html({defaultMessage: "Save changes"});
|
||||
const html_exit_button = conf.html_exit_button ?? $t_html({defaultMessage: "Cancel"});
|
||||
const html = render_dialog_widget({
|
||||
heading_text: conf.html_heading,
|
||||
link: conf.help_link,
|
||||
html_submit_button,
|
||||
html_exit_button,
|
||||
html_body: conf.html_body,
|
||||
id: conf.id,
|
||||
single_footer_button: conf.single_footer_button,
|
||||
|
|
|
@ -513,6 +513,7 @@ export function initialize() {
|
|||
html_body: copy_email_address,
|
||||
id: "copy_email_address_modal",
|
||||
html_submit_button: $t_html({defaultMessage: "Copy address"}),
|
||||
html_exit_button: $t_html({defaultMessage: "Close"}),
|
||||
help_link: "/help/message-a-stream-by-email#configuration-options",
|
||||
on_click() {},
|
||||
close_on_submit: false,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</main>
|
||||
<footer class="modal__footer">
|
||||
{{#unless single_footer_button}}
|
||||
<button class="modal__btn dialog_cancel_button" aria-label="{{t 'Close this dialog window' }}" data-micromodal-close>{{t "Cancel" }}</button>
|
||||
<button class="modal__btn dialog_cancel_button" aria-label="{{t 'Close this dialog window' }}" data-micromodal-close>{{{ html_exit_button }}}</button>
|
||||
{{/unless}}
|
||||
<button class="modal__btn dialog_submit_button"{{#if single_footer_button}} aria-label="{{t 'Close this dialog window' }}" data-micromodal-close{{/if}}>
|
||||
<span>{{{ html_submit_button }}}</span>
|
||||
|
|
Loading…
Reference in New Issue