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
  • Loading branch information
sidolov authored Feb 12, 2019
2 parents 2574519 + 735257a commit d4ac222
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 d4ac222

Please sign in to comment.