Fix: bulk add - private status

Use 'checked' attribute instead of 'value' for checkboxes. 'value' always returns 'on'.

Fixes #1684
This commit is contained in:
ArthurHoaro 2021-01-19 11:55:50 +01:00
parent ffa39719a1
commit 47ac77adbb

View file

@ -4,7 +4,11 @@ const sendBookmarkForm = (basePath, formElement) => {
const formData = new FormData(); const formData = new FormData();
[...inputs].forEach((input) => { [...inputs].forEach((input) => {
formData.append(input.getAttribute('name'), input.value); if (input.getAttribute('type') === 'checkbox') {
formData.append(input.getAttribute('name'), input.checked);
} else {
formData.append(input.getAttribute('name'), input.value);
}
}); });
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {