From 16ab038d4d0577d45e3058ea5c4d2252417a2ac4 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 10 Apr 2018 10:17:08 +0200 Subject: [PATCH] Fix uploading multiple files does not enable submit buttons after upload is done --- api/js/etemplate/et2_widget_file.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_file.js b/api/js/etemplate/et2_widget_file.js index 1d4c3f89e7..9a27fc4f70 100644 --- a/api/js/etemplate/et2_widget_file.js +++ b/api/js/etemplate/et2_widget_file.js @@ -111,6 +111,8 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( this.input = null; this.progress = null; this.span = null; + // Contains all submit buttons need to be disabled during upload process + this.disabled_buttons = jQuery("input[type='submit'], button"); if(!this.options.value) this.options.value = {}; if(!this.options.id) { @@ -411,13 +413,13 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( { // Disable buttons - this.disabled_buttons = jQuery("input[type='submit'], button") + this.disabled_buttons .not("[disabled]") .attr("disabled", true) .addClass('et2_button_ro') .removeClass('et2_clickable') .css('cursor', 'default'); - + // Actually start uploading this.resumable.upload(); }