use the new save button on groups/privileges

This commit is contained in:
Barış Soner Uşaklı
2022-10-25 17:32:45 -04:00
parent 4de9f53296
commit 299b53a3ee
4 changed files with 13 additions and 8 deletions

View File

@@ -39,6 +39,5 @@
"revert": "Revert",
"edit.no-users-found": "No Users Found",
"edit.confirm-remove-user": "Are you sure you want to remove this user?",
"edit.save-success": "Changes saved!"
"edit.confirm-remove-user": "Are you sure you want to remove this user?"
}

View File

@@ -49,7 +49,6 @@
"alert.confirm-moderate": "<strong>Are you sure you wish to grant the moderation privilege to this user group?</strong> This group is public, and any users can join at will.",
"alert.confirm-admins-mods": "<strong>Are you sure you wish to grant the &quot;Admins &amp; Mods&quot; privilege to this user/group?</strong> Users with this privilege are able to promote and demote other users into privileged positions, <em>including super administrator</em>",
"alert.confirm-save": "Please confirm your intention to save these privileges",
"alert.saved": "Privilege changes saved and applied",
"alert.confirm-discard": "Are you sure you wish to discard your privilege changes?",
"alert.discarded": "Privilege changes discarded",
"alert.confirm-copyToAll": "Are you sure you wish to apply this set of <strong>%1</strong> to <strong>all categories</strong>?",

View File

@@ -10,7 +10,11 @@ define('admin/manage/group', [
'api',
'bootbox',
'alerts',
], function (memberList, iconSelect, translator, categorySelector, groupSearch, slugify, api, bootbox, alerts) {
'admin/settings',
], function (
memberList, iconSelect, translator, categorySelector, groupSearch,
slugify, api, bootbox, alerts, settings,
) {
const Groups = {};
Groups.init = function () {
@@ -104,8 +108,7 @@ define('admin/manage/group', [
if (groupName !== newName) {
ajaxify.go('admin/manage/groups/' + encodeURIComponent(newName), undefined, true);
}
alerts.success('[[admin/manage/groups:edit.save-success]]');
settings.toggleSaveSuccess($('#save'));
}).catch(alerts.error);
return false;
});

View File

@@ -9,7 +9,11 @@ define('admin/manage/privileges', [
'categorySelector',
'mousetrap',
'admin/modules/checkboxRowSelector',
], function (api, autocomplete, bootbox, alerts, translator, categorySelector, mousetrap, checkboxRowSelector) {
'admin/settings',
], function (
api, autocomplete, bootbox, alerts, translator,
categorySelector, mousetrap, checkboxRowSelector, settings,
) {
const Privileges = {};
let cid;
@@ -170,7 +174,7 @@ define('admin/manage/privileges', [
alerts.error(result.reason);
});
} else {
alerts.success('[[admin/manage/privileges:alert.saved]]');
settings.toggleSaveSuccess($('#save'));
}
});
};