Fix broken file widget's accept option caused by Resumable overriding it on initiation

This commit is contained in:
Hadi Nategh 2022-02-01 13:28:56 +01:00
parent c7549daa54
commit 1929ac02f6

View File

@ -200,7 +200,6 @@ export class et2_file extends et2_inputWidget
jQuery(span).removeClass('et2_file_spanActive');
}
});
if (this.options.accept) this.input.attr('accept', this.options.accept);
let self = this;
// trigger native input upload file
if (!this.options.readonly) this.span.click(function(){self.input.click()});
@ -218,6 +217,8 @@ export class et2_file extends et2_inputWidget
{
// This may be a problem submitting via ajax
}
if (this.options.accept) this.input.attr('accept', this.options.accept);
if(this.options.progress)
{
let widget = this.getRoot().getWidgetById(this.options.progress);