diff --git a/babybuddy/static_src/js/babybuddy.js b/babybuddy/static_src/js/babybuddy.js index 8c34571c..0771acaf 100644 --- a/babybuddy/static_src/js/babybuddy.js +++ b/babybuddy/static_src/js/babybuddy.js @@ -59,3 +59,10 @@ BabyBuddy.PullToRefresh = function(ptr) { } }; }(PullToRefresh); + +/** + * Fix for duplicate form submission from double pressing submit + */ +$("form").on("submit", function() { + $(this).find("button[type='submit']").prop('disabled', true); +}); \ No newline at end of file diff --git a/static/babybuddy/js/app.d2994702ae86.js b/static/babybuddy/js/app.d2994702ae86.js index 52560741..6fe182dc 100644 --- a/static/babybuddy/js/app.d2994702ae86.js +++ b/static/babybuddy/js/app.d2994702ae86.js @@ -60,6 +60,13 @@ BabyBuddy.PullToRefresh = function(ptr) { }; }(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 * * Uses a supplied ID to run a timer. The element using the ID must have diff --git a/static/babybuddy/js/app.js b/static/babybuddy/js/app.js index 52560741..6fe182dc 100644 --- a/static/babybuddy/js/app.js +++ b/static/babybuddy/js/app.js @@ -60,6 +60,13 @@ BabyBuddy.PullToRefresh = function(ptr) { }; }(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 * * Uses a supplied ID to run a timer. The element using the ID must have