dialog_widget: Rename "dialog_cancel_button" to "dialog_exit_button".

This commit renames "dialog_cancel_button" class in the exit button
of modals to "dialog_exit_button", which seems a much better name
for a button that is used to close a modal.
This commit is contained in:
Sahil Batra 2023-07-25 21:28:43 +05:30 committed by Tim Abbott
parent 8db9093d0b
commit befcb46ba3
7 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@
</p>
</main>
<footer class="modal__footer">
<button class="modal__btn dialog_cancel_button" aria-label="{{ '(Close this dialog window)' }}" data-micromodal-close>{{ _('Cancel') }}</button>
<button class="modal__btn dialog_exit_button" aria-label="{{ '(Close this dialog window)' }}" data-micromodal-close>{{ _('Cancel') }}</button>
<button class="modal__btn dialog_submit_button">
<span>{{ _('Confirm') }}</span>
</button>

View File

@ -104,7 +104,7 @@ async function test_edit_invalid_linkifier(page: Page): Promise<void> {
);
assert.strictEqual(edit_linkifier_template_status, "Failed: Invalid URL template.");
await page.click(".dialog_cancel_button");
await page.click(".dialog_exit_button");
await page.waitForSelector("#dialog_widget_modal", {hidden: true});
await page.waitForSelector(".linkifier_row", {visible: true});

View File

@ -248,7 +248,7 @@ async function test_invalid_edit_bot_form(page: Page): Promise<void> {
"Failed: Name is already in use!",
);
const cancel_button_selector = "#edit_bot_modal .dialog_cancel_button";
const cancel_button_selector = "#edit_bot_modal .dialog_exit_button";
await page.waitForFunction(
(cancel_button_selector: string) =>
!document.querySelector(cancel_button_selector)?.hasAttribute("disabled"),
@ -320,7 +320,7 @@ async function test_duplicate_alert_words_cannot_be_added(
const status_text = await common.get_text_from_selector(page, alert_word_status_selector);
assert.strictEqual(status_text, "Alert word already exists!");
await page.click("#add-alert-word .dialog_cancel_button");
await page.click("#add-alert-word .dialog_exit_button");
await common.wait_for_micromodal_to_close(page);
}

View File

@ -151,7 +151,7 @@ function submit_invitation_form() {
complete() {
$("#invite-user-modal .dialog_submit_button").text($t({defaultMessage: "Invite"}));
$("#invite-user-modal .dialog_submit_button").prop("disabled", false);
$("#invite-user-modal .dialog_cancel_button").prop("disabled", false);
$("#invite-user-modal .dialog_exit_button").prop("disabled", false);
$("#invitee_emails").trigger("focus");
scroll_util.get_scroll_element($("#invite-user-modal"))[0].scrollTop = 0;
},
@ -178,7 +178,7 @@ function generate_multiuse_invite() {
$t({defaultMessage: "Generate invite link"}),
);
$("#invite-user-modal .dialog_submit_button").prop("disabled", false);
$("#invite-user-modal .dialog_cancel_button").prop("disabled", false);
$("#invite-user-modal .dialog_exit_button").prop("disabled", false);
scroll_util.get_scroll_element($("#invite-user-modal"))[0].scrollTop = 0;
},
});

View File

@ -50,7 +50,7 @@
}
/************************* MODAL DARK THEME *******************/
.dialog_cancel_button {
.dialog_exit_button {
background-color: hsl(211deg 29% 14%);
color: hsl(0deg 0% 100%);
border: 1px solid hsl(0deg 0% 0% / 60%);

View File

@ -124,7 +124,7 @@
transform: scale(1.05);
}
.dialog_cancel_button {
.dialog_exit_button {
background: hsl(0deg 0% 100%);
border: 1px solid hsl(300deg 2% 11% / 30%);

View File

@ -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>{{{ html_exit_button }}}</button>
<button class="modal__btn dialog_exit_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>