-
Notifications
You must be signed in to change notification settings - Fork 199
[user_accounts] Add SweetAlert2 confirmation dialog to 'Reject User' action #10474
Copy link
Copy link
Open
Labels
26.0.0-bugsIssues that were raised during the release testing for 26.0.0Issues that were raised during the release testing for 26.0.0Area: UIPR or issue related to the user interfacePR or issue related to the user interfaceCategory: FeaturePR or issue that aims to introduce a new featurePR or issue that aims to introduce a new featureLanguage: JavascriptPR or issue that update Javascript codePR or issue that update Javascript codeModule: user_accountsPR or issue related to the user_accounts modulePR or issue related to the user_accounts modulePriority: HighPR or issue should be prioritised over others for review and testingPR or issue should be prioritised over others for review and testingProposalPR or issue suggesting an improvement that can be accepted, rejected or alteredPR or issue suggesting an improvement that can be accepted, rejected or altered
Metadata
Metadata
Assignees
Labels
26.0.0-bugsIssues that were raised during the release testing for 26.0.0Issues that were raised during the release testing for 26.0.0Area: UIPR or issue related to the user interfacePR or issue related to the user interfaceCategory: FeaturePR or issue that aims to introduce a new featurePR or issue that aims to introduce a new featureLanguage: JavascriptPR or issue that update Javascript codePR or issue that update Javascript codeModule: user_accountsPR or issue related to the user_accounts modulePR or issue related to the user_accounts modulePriority: HighPR or issue should be prioritised over others for review and testingPR or issue should be prioritised over others for review and testingProposalPR or issue suggesting an improvement that can be accepted, rejected or alteredPR or issue suggesting an improvement that can be accepted, rejected or altered
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is your feature request related to an existing module?
Currently, clicking the "Reject User" button in the
user_accountsmodule instantly fires an AJAX request without any warning or confirmation. This can easily lead to accidental user rejections, which can be frustrating for project administrators.Describe the solution you'd like
To wrap the rejection AJAX call inside a
swal.fire()(SweetAlert2) confirmation modal, forcing the admin to explicitly confirm before the user is rejected.Describe alternatives you've considered
Using a standard browser
confirm()prompt, but LORIS standardizes on SweetAlert2 for modern UI components.Additional context
To implement this cleanly without adding global script tags,
rejectUser.jsneeds to be rewritten from a plain jQuery script into a compiled React/JSX file so thatsweetalert2can be cleanly imported via Webpack.