fix: wrong usage of is ACP

isekai-main
Barış Soner Uşaklı 3 years ago committed by GitHub
parent 4a53adf626
commit 4f4236101b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,15 +14,15 @@ define('accounts/invite', ['api', 'benchpress', 'bootbox'], function (api, Bench
Benchpress.parse('modals/invite', { groups: groups }, function (html) { Benchpress.parse('modals/invite', { groups: groups }, function (html) {
bootbox.dialog({ bootbox.dialog({
message: html, message: html,
title: `[[${isACP ? 'admin/manage/users:invite' : 'users:invite'}]]`, title: `[[${isACP() ? 'admin/manage/users:invite' : 'users:invite'}]]`,
onEscape: true, onEscape: true,
buttons: { buttons: {
cancel: { 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', className: 'btn-default',
}, },
invite: { invite: {
label: `[[${isACP ? 'admin/manage/users:invite' : 'users:invite'}]]`, label: `[[${isACP() ? 'admin/manage/users:invite' : 'users:invite'}]]`,
className: 'btn-primary', className: 'btn-primary',
callback: Invite.send, 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(() => { 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) => { }).catch((err) => {
app.alertError(err.message); app.alertError(err.message);
}); });

Loading…
Cancel
Save