Skip to content

Commit 85c4e92

Browse files
author
Serhiy Zhovnir
committed
#20376 Fixed issue with variables declarations and adjusted the notification message
1 parent dd9e8cf commit 85c4e92

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/code/Magento/Ui/i18n/en_US.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,5 @@ CSV,CSV
190190
"Please enter at least {0} characters.","Please enter at least {0} characters."
191191
"Please enter a value between {0} and {1} characters long.","Please enter a value between {0} and {1} characters long."
192192
"Please enter a value between {0} and {1}.","Please enter a value between {0} and {1}."
193-
"was not uploaded","was not uploaded"
193+
"was not uploaded","was not uploaded"
194+
"The file upload field is disabled.","The file upload field is disabled."

app/code/Magento/Ui/view/base/web/js/form/element/file-uploader.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,16 +344,15 @@ define([
344344
* @param {Object} data - File data that will be uploaded.
345345
*/
346346
onBeforeFileUpload: function (e, data) {
347-
if (this.disabled()) {
348-
this.notifyError($t('was not uploaded'));
349-
350-
return;
351-
}
352-
353347
var file = data.files[0],
354348
allowed = this.isFileAllowed(file),
355349
target = $(e.target);
356350

351+
if (this.disabled()) {
352+
this.notifyError($t('The file upload field is disabled.'));
353+
return;
354+
}
355+
357356
if (allowed.passed) {
358357
target.on('fileuploadsend', function (event, postData) {
359358
postData.data.append('param_name', this.paramName);

0 commit comments

Comments
 (0)