fix(autosave): on check condition requests do not send file inputs

This commit is contained in:
Paul Chavard 2022-08-02 17:47:26 +02:00
parent fdbcdfd043
commit cf315b7246

View file

@ -70,7 +70,14 @@ export class CheckConditionsController extends ApplicationController {
return Promise.resolve();
}
const fileInputs = form.querySelectorAll('input[type="file"]');
for (const input of fileInputs) {
input.setAttribute('disabled', 'disabled');
}
const formData = new FormData(form);
for (const input of fileInputs) {
input.removeAttribute('disabled');
}
formData.set('check_conditions', 'true');
return httpRequest(form.action, {