aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2021-01-19 11:55:50 +0100
committerArthurHoaro <arthur@hoa.ro>2021-01-19 11:55:50 +0100
commit47ac77adbb6a05a79e50143208a00915886a84ab (patch)
treed6ada06cedf5fdf1789b58cee054777219c4d8d7
parentffa39719a17982e6a6cac9bc3f758aa12fa69973 (diff)
downloadShaarli-47ac77adbb6a05a79e50143208a00915886a84ab.tar.gz
Shaarli-47ac77adbb6a05a79e50143208a00915886a84ab.tar.zst
Shaarli-47ac77adbb6a05a79e50143208a00915886a84ab.zip
Fix: bulk add - private status
Use 'checked' attribute instead of 'value' for checkboxes. 'value' always returns 'on'. Fixes #1684
-rw-r--r--assets/common/js/shaare-batch.js6
1 files changed, 5 insertions, 1 deletions
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) => {
4 4
5 const formData = new FormData(); 5 const formData = new FormData();
6 [...inputs].forEach((input) => { 6 [...inputs].forEach((input) => {
7 formData.append(input.getAttribute('name'), input.value); 7 if (input.getAttribute('type') === 'checkbox') {
8 formData.append(input.getAttribute('name'), input.checked);
9 } else {
10 formData.append(input.getAttribute('name'), input.value);
11 }
8 }); 12 });
9 13
10 return new Promise((resolve, reject) => { 14 return new Promise((resolve, reject) => {