mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-04 02:45:53 +08:00
Prevent double click on button new experiment [SCI-7707] (#4783)
This commit is contained in:
parent
99d190f0d6
commit
06cdeb2d61
1 changed files with 5 additions and 0 deletions
|
@ -317,11 +317,16 @@
|
|||
function initNewExperimentToolbarButton() {
|
||||
let forms = '.new-experiment-form';
|
||||
$(experimentsPage)
|
||||
.on('submit', forms, function() {
|
||||
$(this).find("button[type='submit']").prop('disabled', true);
|
||||
})
|
||||
.on('ajax:success', forms, function(ev, data) {
|
||||
appendActionModal($(data.html));
|
||||
$(this).find("button[type='submit']").prop('disabled', false);
|
||||
})
|
||||
.on('ajax:error', forms, function(ev, data) {
|
||||
HelperModule.flashAlertMsg(data.responseJSON.message, 'danger');
|
||||
$(this).find("button[type='submit']").prop('disabled', false);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue