File tree 2 files changed +7
-7
lines changed
view/base/web/js/form/element
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -190,4 +190,5 @@ CSV,CSV
190
190
"Please enter at least {0} characters.","Please enter at least {0} characters."
191
191
"Please enter a value between {0} and {1} characters long.","Please enter a value between {0} and {1} characters long."
192
192
"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."
Original file line number Diff line number Diff line change @@ -344,16 +344,15 @@ define([
344
344
* @param {Object } data - File data that will be uploaded.
345
345
*/
346
346
onBeforeFileUpload : function ( e , data ) {
347
- if ( this . disabled ( ) ) {
348
- this . notifyError ( $t ( 'was not uploaded' ) ) ;
349
-
350
- return ;
351
- }
352
-
353
347
var file = data . files [ 0 ] ,
354
348
allowed = this . isFileAllowed ( file ) ,
355
349
target = $ ( e . target ) ;
356
350
351
+ if ( this . disabled ( ) ) {
352
+ this . notifyError ( $t ( 'The file upload field is disabled.' ) ) ;
353
+ return ;
354
+ }
355
+
357
356
if ( allowed . passed ) {
358
357
target . on ( 'fileuploadsend' , function ( event , postData ) {
359
358
postData . data . append ( 'param_name' , this . paramName ) ;
You can’t perform that action at this time.
0 commit comments