From e2e60000a666763a1cd4450883fc31d0e23dfee3 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 23 Apr 2013 15:29:26 +0200 Subject: [PATCH] avoid double click when submitting answer --- teleforma/templates/teleforma/answer_form.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teleforma/templates/teleforma/answer_form.html b/teleforma/templates/teleforma/answer_form.html index 8419b666..b39d1e73 100644 --- a/teleforma/templates/teleforma/answer_form.html +++ b/teleforma/templates/teleforma/answer_form.html @@ -32,6 +32,7 @@ $(document).ready(function(){ new Messi(gettext('You must reach the required number of characters.'), {buttons: [{id: 0, label: gettext('OK'), val: 'X'}], modal: true}); } if (c.hasClass('exceed')){ + b1.unbind('click'); $('#id_status').val("3"); $('#_AnswerForm').submit(); } @@ -40,6 +41,7 @@ $(document).ready(function(){ var b2 = $('#save_button'); b2.unbind('click').click(function() { $(window).unbind('beforeunload'); + b1.unbind('click'); $('#_AnswerForm').submit(); }); -- 2.39.5