Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

After saving the workout session from timer view, disable the button

Roland Geider560c6dc66716
diff --git a/wger/manager/templates/workout/timer.html b/wger/manager/templates/workout/timer.html
index c2b1ec341..ad9b6e431 100644
--- a/wger/manager/templates/workout/timer.html
+++ b/wger/manager/templates/workout/timer.html
@@ -235,8 +235,14 @@ $(document).ready(function() {
e.preventDefault();
$.post( $('#session-form').attr('action'),
$('#session-form').serialize(),
+
+ // After clicking on the save button once, disable it
function( data ) {
-
+ $('#save_button_form').unbind("click");
+ $('#save_button_form').addClass('ui-disabled');
+ $('#save_button_form').bind("click", function(e) {
+ e.preventDefault();
+ });
});
});
});