Project

General

Profile

0001-general-disable-form-submit-button-when-an-upload-is.patch

Frédéric Péters (de retour le 27 mai), 05 February 2016 04:06 PM

Download (1.44 KB)

View differences:

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(+)
wcs/qommon/static/js/qommon.fileupload.js
12 12
                $(base_widget).find('.fileprogress .bar').css('width', '0%');
13 13
                $(base_widget).find('.fileprogress').show();
14 14
                $(base_widget).find('.fileinfo').hide();
15
                $(base_widget).parents('form').find('input[name=submit]').prop('disabled', true);
15 16
                var jqXHR = data.submit();
16 17
            },
17 18
            done: function(e, data) {
......
19 20
                $(base_widget).find('.filename').text(data.result[0].name);
20 21
                $(base_widget).find('.fileinfo').show();
21 22
                $(base_widget).find('input[type=hidden]').val(data.result[0].token);
23
                $(base_widget).parents('form').find('input[name=submit]').prop('disabled', false);
22 24
                $(this).hide();
23 25
            },
24 26
            progress: function (e, data) {
25
-