Merge pull request #1691 from ArthurHoaro/fix/bulk-add-js-checkboxes

Fix: bulk add - private status
This commit is contained in:
ArthurHoaro 2021-01-19 14:30:40 +01:00 committed by GitHub
commit 5b5d22a3df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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