Skip to content

Commit

Permalink
[Module Manager] Fix punctuation in reload prompt (aces#6824)
Browse files Browse the repository at this point in the history
The alert prompting the user to reload the page in
the module manager had incorrect spacing and punctuation
in the message shown to the user. This corrects it.
  • Loading branch information
driusan authored and spell00 committed Aug 13, 2020
1 parent 3ffc2b9 commit ca2a7e3
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions modules/module_manager/jsx/modulemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class ModuleManagerIndex extends Component {
*
*/
toggleActive(name, value, id) {
<<<<<<< 3ffc2b9a97f68c574dadc3731c3ac304350ab51b
fetch(
this.props.BaseURL + '/module_manager/modules/' + id,
{
Expand Down Expand Up @@ -127,6 +128,56 @@ class ModuleManagerIndex extends Component {
}
}
});
=======
fetch(
this.props.BaseURL + '/module_manager/modules/' + id,
{
method: 'PATCH',
body: JSON.stringify({
'Active': value,
}),
mode: 'same-origin',
credentials: 'same-origin',
cache: 'no-cache',
}
).then((response) => {
if (response.status != 205) {
swal.fire('Error!', 'Could not update ' + id + '.', 'error');
} else {
const success = this.setModuleDisplayStatus(id, value);
if (success === true) {
swal.fire({
title: 'Success!',
<<<<<<< 69afebf3fdbf1c7cb89f01436df44511e074af13
text: 'Updated ' + id + ' status! '
+ 'To apply changes the interface must be reloaded. '
+ 'Proceed ?',
=======
text: 'Updated ' + id + ' status! ' +
'To apply changes the interface must be reloaded. Proceed?',
>>>>>>> [Module Manager] Fix punctuation in reload prompt (#6824)
type: 'success',
showCancelButton: true,
confirmButtonText: 'Reload the page',
cancelButtonText: 'Continue',
}).then((status) => {
if (status.value) {
window.location.href = this.props.BaseURL
+ '/module_manager';
}
});
} else {
// If we get here something went very wrong, because somehow
// a module was toggled that isn't in the table.
swal.fire(
'Error!',
'Could not find module ' + id + '.',
'error'
);
}
}
});
>>>>>>> [Module Manager] Fix punctuation in reload prompt (#6824)
}

/**
Expand Down

0 comments on commit ca2a7e3

Please # to comment.