aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/default/js/base.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/assets/default/js/base.js b/assets/default/js/base.js
index 9161b4fc..4163577d 100644
--- a/assets/default/js/base.js
+++ b/assets/default/js/base.js
@@ -654,5 +654,13 @@ function init(description) {
654 e.preventDefault(); 654 e.preventDefault();
655 toggleBulkCreationVisibility(bulkCreationButton, bulkCreationForm); 655 toggleBulkCreationVisibility(bulkCreationButton, bulkCreationForm);
656 }); 656 });
657
658 // Force to send falsy value if the checkbox is not checked.
659 const privateButton = bulkCreationForm.querySelector('input[type="checkbox"][name="private"]');
660 const privateHiddenButton = bulkCreationForm.querySelector('input[type="hidden"][name="private"]');
661 privateButton.addEventListener('click', () => {
662 privateHiddenButton.disabled = !privateHiddenButton.disabled;
663 });
664 privateHiddenButton.disabled = privateButton.checked;
657 } 665 }
658})(); 666})();