fix(usermanager): disable duplicate ajax requests

- disable `.toggleMembershipButton` buttons while ajax request is in
  progress
This commit is contained in:
Julian Lobbes 2022-12-01 23:43:07 +01:00
parent 180fccaf90
commit d1acd0a01d

View File

@ -65,6 +65,7 @@ class UserEntry {
'<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>' +
'<span> Loading...</span>'
);
this.buttonElement.prop("disabled", true);
}
setButtonAppearanceLeaveGroup() {
@ -74,6 +75,7 @@ class UserEntry {
this.buttonElement.html(
'<i class="bi-person-fill-dash"></i> Remove'
);
this.buttonElement.prop("disabled", false);
}
setButtonAppearanceJoinGroup() {
@ -83,6 +85,7 @@ class UserEntry {
this.buttonElement.html(
'<i class="bi-person-fill-add"></i> Add'
);
this.buttonElement.prop("disabled", false);
}
}