mirror of https://github.com/zulip/zulip.git
bots: Customize reactivation confirmation modal for bots.
Since bots can't join user groups, and end users don't think of bots as a special class of users, it's worth having special text here. Fixes: #23270.
This commit is contained in:
parent
5814b61f00
commit
15b9e9c7cc
|
@ -1,6 +1,7 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import render_settings_deactivation_user_modal from "../templates/confirm_dialog/confirm_deactivate_user.hbs";
|
||||
import render_settings_reactivation_bot_modal from "../templates/confirm_dialog/confirm_reactivate_bot.hbs";
|
||||
import render_settings_reactivation_user_modal from "../templates/confirm_dialog/confirm_reactivate_user.hbs";
|
||||
import render_admin_human_form from "../templates/settings/admin_human_form.hbs";
|
||||
import render_admin_user_list from "../templates/settings/admin_user_list.hbs";
|
||||
|
@ -524,7 +525,14 @@ export function confirm_reactivation(user_id, handle_confirm, loading_spinner) {
|
|||
const opts = {
|
||||
username: user.full_name,
|
||||
};
|
||||
const html_body = render_settings_reactivation_user_modal(opts);
|
||||
|
||||
let html_body;
|
||||
// check if bot or human
|
||||
if (user.is_bot) {
|
||||
html_body = render_settings_reactivation_bot_modal(opts);
|
||||
} else {
|
||||
html_body = render_settings_reactivation_user_modal(opts);
|
||||
}
|
||||
|
||||
confirm_dialog.launch({
|
||||
html_heading: $t_html({defaultMessage: "Reactivate {name}"}, {name: user.full_name}),
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<p>
|
||||
{{#tr}}
|
||||
<z-user></z-user> will have the same properties as it did prior to deactivation,
|
||||
including role, owner and stream subscriptions.
|
||||
{{#*inline "z-user"}}<strong>{{username}}</strong>{{/inline}}
|
||||
{{/tr}}
|
||||
</p>
|
|
@ -52,6 +52,7 @@ IGNORED_PHRASES = [
|
|||
# BeautifulSoup will remove <z-user> which is horribly confusing,
|
||||
# so we need more of the sentence.
|
||||
r"<z-user></z-user> will have the same role",
|
||||
r"<z-user></z-user> will have the same properties",
|
||||
# Things using "I"
|
||||
r"I understand",
|
||||
r"I'm",
|
||||
|
|
Loading…
Reference in New Issue