mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 13:20:41 +01:00
fix: wrong usage of is ACP
This commit is contained in:
committed by
GitHub
parent
4a53adf626
commit
4f4236101b
@@ -14,15 +14,15 @@ define('accounts/invite', ['api', 'benchpress', 'bootbox'], function (api, Bench
|
||||
Benchpress.parse('modals/invite', { groups: groups }, function (html) {
|
||||
bootbox.dialog({
|
||||
message: html,
|
||||
title: `[[${isACP ? 'admin/manage/users:invite' : 'users:invite'}]]`,
|
||||
title: `[[${isACP() ? 'admin/manage/users:invite' : 'users:invite'}]]`,
|
||||
onEscape: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
label: `[[${isACP ? 'admin/manage/users:alerts.button-cancel' : 'modules:bootbox.cancel'}]]`,
|
||||
label: `[[${isACP() ? 'admin/manage/users:alerts.button-cancel' : 'modules:bootbox.cancel'}]]`,
|
||||
className: 'btn-default',
|
||||
},
|
||||
invite: {
|
||||
label: `[[${isACP ? 'admin/manage/users:invite' : 'users:invite'}]]`,
|
||||
label: `[[${isACP() ? 'admin/manage/users:invite' : 'users:invite'}]]`,
|
||||
className: 'btn-primary',
|
||||
callback: Invite.send,
|
||||
},
|
||||
@@ -54,7 +54,7 @@ define('accounts/invite', ['api', 'benchpress', 'bootbox'], function (api, Bench
|
||||
}
|
||||
|
||||
api.post(`/users/${app.user.uid}/invites`, data).then(() => {
|
||||
app.alertSuccess(`[[${isACP ? 'admin/manage/users:alerts.email-sent-to' : 'users:invitation-email-sent'}, ${data.emails.replace(/,/g, ', ')}]]`);
|
||||
app.alertSuccess(`[[${isACP() ? 'admin/manage/users:alerts.email-sent-to' : 'users:invitation-email-sent'}, ${data.emails.replace(/,/g, ', ')}]]`);
|
||||
}).catch((err) => {
|
||||
app.alertError(err.message);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user