From 64abe348b3429aceb4d54b1342a9eb85fa3b608b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 5 Feb 2016 16:05:24 +0100 Subject: [PATCH] general: disable form submit button when an upload is in progress (#9882) --- wcs/qommon/static/js/qommon.fileupload.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcs/qommon/static/js/qommon.fileupload.js b/wcs/qommon/static/js/qommon.fileupload.js index 6787ddc..cc6ee8c 100644 --- a/wcs/qommon/static/js/qommon.fileupload.js +++ b/wcs/qommon/static/js/qommon.fileupload.js @@ -12,6 +12,7 @@ $(function() { $(base_widget).find('.fileprogress .bar').css('width', '0%'); $(base_widget).find('.fileprogress').show(); $(base_widget).find('.fileinfo').hide(); + $(base_widget).parents('form').find('input[name=submit]').prop('disabled', true); var jqXHR = data.submit(); }, done: function(e, data) { @@ -19,6 +20,7 @@ $(function() { $(base_widget).find('.filename').text(data.result[0].name); $(base_widget).find('.fileinfo').show(); $(base_widget).find('input[type=hidden]').val(data.result[0].token); + $(base_widget).parents('form').find('input[name=submit]').prop('disabled', false); $(this).hide(); }, progress: function (e, data) { -- 2.7.0