Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add data attribute to HTML for behaviour, and always insert data-modu…
…le attribute. This fixes a bug/edge-case where if you use two separate calls to the macro within the same `<form>` and specify the same `name` attribute value for both sets of checkboxes, but only one of them has the `exclusive` behaviour or the conditional content, then checking a checkbox in one list would not uncheck the "None" checkbox in the other list, as there was no `eventListener` set up. Always initialising the javascript for every set of checkboxes solves this. This does introduce a small performance penalty of potentially initialising javascript when it's not needed, but this should be negligible and non-blocking.
- Loading branch information