Skip to content

[user_accounts] Add SweetAlert2 confirmation dialog to 'Reject User' action #10474

@priyavrat7

Description

@priyavrat7

Is your feature request related to an existing module?
Currently, clicking the "Reject User" button in the user_accounts module 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.js needs to be rewritten from a plain jQuery script into a compiled React/JSX file so that sweetalert2 can be cleanly imported via Webpack.

Image

Metadata

Metadata

Assignees

Labels

26.0.0-bugsIssues that were raised during the release testing for 26.0.0Area: UIPR or issue related to the user interfaceCategory: FeaturePR or issue that aims to introduce a new featureLanguage: JavascriptPR or issue that update Javascript codeModule: user_accountsPR or issue related to the user_accounts modulePriority: HighPR or issue should be prioritised over others for review and testingProposalPR or issue suggesting an improvement that can be accepted, rejected or altered

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions