Skip to content

Commit

Permalink
ENGCOM-3937: #20376 Fix issue with file uploading if an upload field …
Browse files Browse the repository at this point in the history
…is disabled #20461

 - Merge Pull Request #20461 from serhiyzhovnir/magento2:issue-20376-fixed-2.3
 - Merged commits:
   1. dd9e8cf
   2. 85c4e92
   3. d91d0ed
   4. 3671bbe
   5. b0363af
  • Loading branch information
magento-engcom-team committed Feb 11, 2019
2 parents 92118f5 + b0363af commit 735257a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/code/Magento/Ui/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,5 @@ CSV,CSV
"Please enter at least {0} characters.","Please enter at least {0} characters."
"Please enter a value between {0} and {1} characters long.","Please enter a value between {0} and {1} characters long."
"Please enter a value between {0} and {1}.","Please enter a value between {0} and {1}."
"was not uploaded","was not uploaded"
"was not uploaded","was not uploaded"
"The file upload field is disabled.","The file upload field is disabled."
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,12 @@ define([
allowed = this.isFileAllowed(file),
target = $(e.target);

if (this.disabled()) {
this.notifyError($t('The file upload field is disabled.'));

return;
}

if (allowed.passed) {
target.on('fileuploadsend', function (event, postData) {
postData.data.append('param_name', this.paramName);
Expand Down

0 comments on commit 735257a

Please sign in to comment.