From: Guillaume Pellerin Date: Tue, 23 Apr 2013 13:29:26 +0000 (+0200) Subject: avoid double click when submitting answer X-Git-Tag: 2.8.1-pro~491^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=e2e60000a666763a1cd4450883fc31d0e23dfee3;p=teleforma.git avoid double click when submitting answer --- 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(); });