users: Fix unable to delete user

Fixes an issue where confirming user deletion is not submitting the user
edit form.

Also fixes an issue where the user edit submit button is disabled after user
deletion confirmation is cancelled.

Fixes #2513.

Tests performed:
- Deleting a user works.
- All the users module tests pass.
- After cancelling the user deletion confirmation dialog, the user edit
  submit button is clickable.
- On the app pages, submit buttons are disabled when app enabling or disabling
is in progress.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa authored and Sunil Mohan Adapa committed 2025-04-15 12:02:15 -07:00
1 parent 0d9c81da03
commit 92aa66114c
2 files changed
+16 -7

No files matched your search

+5 -1
View File
@@ -33,7 +33,11 @@ document.addEventListener('DOMContentLoaded', (event) => {
});
var deleteConfirmed = false;
const modal = new bootstrap.Modal('#user-delete-confirm-dialog');
const modalEl = document.querySelector('#user-delete-confirm-dialog');
const modal = new bootstrap.Modal(modalEl);
// Make the user edit submit button clickable again when closing modal
modalEl.addEventListener('hide.bs.modal', clearButtonDisabling);
// Show the confirmation dialog if the delete checkbox is selected
function onUserUpdateSubmit(event) {