mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
settings: Send email after deactivating user.
This adds a feature where an admin can choose to send an email with custom content to an user after they deactivated them. Fixes #18943.
This commit is contained in:
committed by
Tim Abbott
parent
b8a760b14e
commit
0a278c39d2
@@ -118,6 +118,10 @@ 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
|
||||
@@ -140,6 +144,14 @@ 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: () => {
|
||||
|
||||
Reference in New Issue
Block a user