From 47ac77adbb6a05a79e50143208a00915886a84ab Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 19 Jan 2021 11:55:50 +0100 Subject: Fix: bulk add - private status Use 'checked' attribute instead of 'value' for checkboxes. 'value' always returns 'on'. Fixes #1684 --- assets/common/js/shaare-batch.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'assets') diff --git a/assets/common/js/shaare-batch.js b/assets/common/js/shaare-batch.js index 557325ee..9753137d 100644 --- a/assets/common/js/shaare-batch.js +++ b/assets/common/js/shaare-batch.js @@ -4,7 +4,11 @@ const sendBookmarkForm = (basePath, formElement) => { const formData = new FormData(); [...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) => { -- cgit v1.2.3