(targetId)
| 604 | } |
| 605 | |
| 606 | function toggleSourceGroup(targetId) { |
| 607 | const inputs = [...document.querySelectorAll(`#${targetId} input[type='checkbox']:not(:disabled)`)]; |
| 608 | if (!inputs.length) return; |
| 609 | const shouldCheck = inputs.some((input) => !input.checked); |
| 610 | inputs.forEach((input) => { |
| 611 | input.checked = shouldCheck; |
| 612 | }); |
| 613 | } |
| 614 | |
| 615 | function renderRoles(roles) { |
| 616 | const target = $("roleList"); |