Disable filter save button on submit [SCI-6523] (#3833)

This commit is contained in:
artoscinote 2022-02-11 10:14:19 +01:00 committed by GitHub
parent f3c36a957b
commit bac8fbbe58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -212,6 +212,7 @@
$(document).on('click', '#saveRepositoryTableFilterButton', function() {
var $modal = $('#modalSaveRepositoryTableFilter');
var $button = $(this);
var url = $modal.data().saveUrl;
var method;
@ -222,6 +223,8 @@
method = 'POST';
}
$button.addClass('disabled');
$.ajax({
type: method,
url: url,
@ -252,9 +255,11 @@
}
repositoryFilterObject.filterName = response.data.attributes.name;
$button.removeClass('disabled');
},
error: function(response) {
HelperModule.flashAlertMsg(response.responseJSON.message, 'danger');
$button.removeClass('disabled');
}
});
});

View file

@ -195,6 +195,7 @@
color: $color-silver-chalice;
cursor: auto;
opacity: .5;
pointer-events: none;
&.btn-primary,
&.btn-danger {