Skip to content

Commit 6be0343

Browse files
committed
Adds visual indicator for certificate deletion
1 parent 96f401c commit 6be0343

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

frontend/js/app/nginx/certificates/delete.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module.exports = Mn.View.extend({
1616
events: {
1717
'click @ui.save': function (e) {
1818
e.preventDefault();
19+
this.ui.save.addClass('btn-loading');
20+
this.ui.buttons.prop('disabled', true).addClass('btn-disabled');
1921

2022
App.Api.Nginx.Certificates.delete(this.model.get('id'))
2123
.then(() => {
@@ -25,6 +27,7 @@ module.exports = Mn.View.extend({
2527
.catch(err => {
2628
alert(err.message);
2729
this.ui.buttons.prop('disabled', false).removeClass('btn-disabled');
30+
this.ui.save.removeClass('btn-loading');
2831
});
2932
}
3033
}

0 commit comments

Comments
 (0)