Change language from Reject to Deny

This commit is contained in:
2022-02-11 13:37:55 +00:00
parent da89a688b9
commit 016f7489c4
13 changed files with 83 additions and 80 deletions

View File

@@ -47,14 +47,14 @@ function attachOrganisationForm() {
}
/**
* Approve/Reject organisation
* Approve/Deny organisation registration
*/
function approveOrganisation(slug, approve, options) {
function approveOrganisationRegistration(slug, approve, options) {
var data = {};
data[site.csrf.keys.name] = site.csrf.name;
data[site.csrf.keys.value] = site.csrf.value;
var url = site.uri.public + '/api/organisations/o/' + slug + '/registration/' + (approve ? 'approve' : 'reject');
var url = site.uri.public + '/api/organisations/o/' + slug + '/registration/' + (approve ? 'approve' : 'deny');
var debugAjax = (typeof site !== "undefined") && site.debug.ajax;
return $.ajax({
@@ -270,14 +270,14 @@ function bindOrganisationButtons(el, options) {
el.find('.js-organisation-approveRegistration').click(function(e) {
e.preventDefault();
approveOrganisation($(this).data('slug'), true, options);
approveOrganisationRegistration($(this).data('slug'), true, options);
});
// Cancel a registration request
el.find('.js-organisation-rejectRegistration').click(function(e) {
el.find('.js-organisation-denyRegistration').click(function(e) {
e.preventDefault();
approveOrganisation($(this).data('slug'), false, options);
approveOrganisationRegistration($(this).data('slug'), false, options);
});
// Delete organisation button