Skip to content

Commit

Permalink
Issue #4284: Fix auto-upload with multiple file fields on the same form.
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela committed Apr 27, 2022
1 parent 8675ea7 commit 0b85907
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/modules/file/js/file.js
Expand Up @@ -19,10 +19,6 @@ Backdrop.behaviors.fileUploadChange = {
$(context).find('input[data-file-auto-upload]').once('auto-upload').on('change', Backdrop.file.autoUpload).each(function() {
$(this).closest('.form-item').find('.file-upload-button').hide();
});
},
detach: function (context, settings) {
$(context).find('input[data-file-extensions]').off('change', Backdrop.file.validateExtension);
$(context).find('input[data-file-auto-upload]').off('change', Backdrop.file.autoUpload);
}
};

Expand All @@ -33,10 +29,6 @@ Backdrop.behaviors.fileButtons = {
attach: function (context) {
$('input.form-submit', context).once('file-disable-fields').bind('mousedown', Backdrop.file.disableFields);
$('div.form-managed-file input.form-submit', context).once('file-progress-bar').bind('mousedown', Backdrop.file.progressBar);
},
detach: function (context) {
$('input.form-submit', context).unbind('mousedown', Backdrop.file.disableFields);
$('div.form-managed-file input.form-submit', context).unbind('mousedown', Backdrop.file.progressBar);
}
};

Expand Down

1 comment on commit 0b85907

@backdrop-ci
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.