dialog_widget: Remove code related to email field visibility.

The code for hiding and showing email field in the user
deactiavtion modal was added in dialog_widget.js.

This commit removes it and instead add the code to its
relevant module (settings_user.js), since the email field
is present only in one modal and not all modals.
This commit is contained in:
Sahil Batra
2023-02-28 17:29:05 +05:30
committed by Tim Abbott
parent c3f0a4493d
commit 2a366f359b
2 changed files with 15 additions and 12 deletions

View File

@@ -117,10 +117,6 @@ export function launch(conf) {
}
const $submit_button = $dialog.find(".dialog_submit_button");
const $send_email_checkbox = $dialog.find(".send_email");
const $email_field = $dialog.find(".email_field");
$email_field.hide();
// This is used to link the submit button with the form, if present, in the modal.
// This makes it so that submitting this form by pressing Enter on an input element
@@ -143,14 +139,6 @@ export function launch(conf) {
conf.on_click(e);
});
$send_email_checkbox.on("change", () => {
if ($send_email_checkbox.is(":checked")) {
$email_field.show();
} else {
$email_field.hide();
}
});
overlays.open_modal("dialog_widget_modal", {
autoremove: true,
on_show() {