mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
Closes #985
This commit is contained in:
parent
a2498edb76
commit
008f123c7e
1 changed files with 19 additions and 0 deletions
|
@ -54,6 +54,25 @@
|
|||
<checkbox-toggle/>
|
||||
</checkbox-element>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php js_start() ?>
|
||||
document.querySelectorAll("checkbox-toggle").forEach(toggle => {
|
||||
toggle.addEventListener("click", event => {
|
||||
const siblings = event.target.parentElement.children;
|
||||
|
||||
for (const sibling of siblings) {
|
||||
switch(true) {
|
||||
case sibling.tagName.toLowerCase() === "label":
|
||||
sibling.click();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php js_end() ?>
|
||||
</section>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue