Skip to content

Commit

Permalink
magento#20376 Fixed issue with variables declarations and adjusted th…
Browse files Browse the repository at this point in the history
…e notification message
  • Loading branch information
Serhiy Zhovnir committed Jan 22, 2019
1 parent dd9e8cf commit 85c4e92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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 @@ -344,16 +344,15 @@ define([
* @param {Object} data - File data that will be uploaded.
*/
onBeforeFileUpload: function (e, data) {
if (this.disabled()) {
this.notifyError($t('was not uploaded'));

return;
}

var file = data.files[0],
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 85c4e92

Please sign in to comment.