Fixed duplicate data/form-submit from double click

This commit is contained in:
= 2020-10-28 12:58:47 -05:00 committed by Christopher Charbonneau Wells
parent 95a2cdf06d
commit 187d2226e0
3 changed files with 21 additions and 0 deletions

View File

@ -59,3 +59,10 @@ BabyBuddy.PullToRefresh = function(ptr) {
} }
}; };
}(PullToRefresh); }(PullToRefresh);
/**
* Fix for duplicate form submission from double pressing submit
*/
$("form").on("submit", function() {
$(this).find("button[type='submit']").prop('disabled', true);
});

View File

@ -60,6 +60,13 @@ BabyBuddy.PullToRefresh = function(ptr) {
}; };
}(PullToRefresh); }(PullToRefresh);
/**
* Fix for duplicate form submission from double pressing submit
*/
$("form").on("submit", function() {
$(this).find("button[type='submit']").prop('disabled', true);
});
/* Baby Buddy Timer /* Baby Buddy Timer
* *
* Uses a supplied ID to run a timer. The element using the ID must have * Uses a supplied ID to run a timer. The element using the ID must have

View File

@ -60,6 +60,13 @@ BabyBuddy.PullToRefresh = function(ptr) {
}; };
}(PullToRefresh); }(PullToRefresh);
/**
* Fix for duplicate form submission from double pressing submit
*/
$("form").on("submit", function() {
$(this).find("button[type='submit']").prop('disabled', true);
});
/* Baby Buddy Timer /* Baby Buddy Timer
* *
* Uses a supplied ID to run a timer. The element using the ID must have * Uses a supplied ID to run a timer. The element using the ID must have