Skip to content

Commit

Permalink
resolve inline issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nboyse committed Feb 19, 2024
1 parent ff1965d commit 81153ad
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion reports/jinja2/generics/table.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
};
const grid = new agGrid.createGrid(document.querySelector('#myGrid'), gridOptions);
var checkboxes = document.querySelectorAll('.govuk-checkboxes__input');
checkboxes.forEach(function (checkbox) {
checkbox.addEventListener('change', function () {
var fieldName = this.id.replace('toggleFor', '');
toggleColumnVisibility(fieldName);
});
});
});
</script>
{% endif -%}
Expand Down Expand Up @@ -100,7 +108,7 @@
<div id="customToolPanel" class="govuk-form-group govuk-checkboxes govuk-checkboxes--small" style="display: flex; flex-wrap: wrap;">
{% for header in report.headers() %}
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" onclick="toggleColumnVisibility('{{ header['field'] }}')" id='toggleFor{{ header['field'] }}' name='toggleFor{{ header['field'] }}' type="checkbox" value='toggleFor{{ header['field'] }}' checked>
<input class="govuk-checkboxes__input" id='toggleFor{{ header['field'] }}' name='toggleFor{{ header['field'] }}' type="checkbox" value='toggleFor{{ header['field'] }}' checked>
<label class="govuk-label govuk-checkboxes__label" for="toggleFor{{ header['field'] }}">
{{ header['field'] }}
</label>
Expand Down

0 comments on commit 81153ad

Please sign in to comment.