Skip to content

Commit

Permalink
Merge pull request #1052 from DFE-Digital/bugfix/moj-filters-checkbox…
Browse files Browse the repository at this point in the history
…es-not-checked

fix for selected items in filters
  • Loading branch information
paullocknimble authored May 8, 2024
2 parents f6d3509 + 7363d45 commit 907b4f9
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
foreach (var officer in Model.AvailableDeliveryOfficers)
{
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedOfficers" type="checkbox" value="@officer" data-cy="select-projectlist-filter-officer-@officer">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedOfficers" type="checkbox" value="@officer" data-cy="select-projectlist-filter-officer-@officer"
@(Model.SelectedOfficers.Contains(officer) ? "checked" : null) />
<label class="govuk-label govuk-checkboxes__label" for="[email protected]()">
@officer
</label>
Expand All @@ -166,7 +167,8 @@
@foreach (var region in Model.AvailableRegions)
{
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedRegions" type="checkbox" value="@region" data-cy="select-projectlist-filter-region-@region">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedRegions" type="checkbox" value="@region" data-cy="select-projectlist-filter-region-@region"
@(Model.SelectedRegions.Contains(region) ? "checked" : null) />
<label class="govuk-label govuk-checkboxes__label" for="[email protected]()">
@region
</label>
Expand All @@ -189,7 +191,8 @@
@foreach (var localAuthority in Model.AvailableLocalAuthorities)
{
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedLocalAuthorities" type="checkbox" value="@localAuthority" data-cy="select-projectlist-filter-local-authority-@localAuthority">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedLocalAuthorities" type="checkbox" value="@localAuthority" data-cy="select-projectlist-filter-local-authority-@localAuthority"
@(Model.SelectedLocalAuthorities.Contains(localAuthority) ? "checked" : null) />
<label class="govuk-label govuk-checkboxes__label" for="[email protected]()">
@localAuthority
</label>
Expand All @@ -212,7 +215,8 @@
@foreach (var status in Model.AvailableStatuses)
{
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedStatuses" type="checkbox" value="@status" data-cy="select-projectlist-filter-status-@status" />
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedStatuses" type="checkbox" value="@status" data-cy="select-projectlist-filter-status-@status"
@(Model.SelectedStatuses.Contains(status) ? "checked" : null) />
<label class="govuk-label govuk-checkboxes__label" for="[email protected]()">
@status
</label>
Expand All @@ -235,7 +239,8 @@
@foreach (var boardDate in Model.AvailableAdvisoryBoardDates)
{
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedAdvisoryBoardDates" type="checkbox" value="@boardDate" data-cy="select-projectlist-filter-advisory-board-@boardDate">
<input class="govuk-checkboxes__input" id="[email protected]()" name="selectedAdvisoryBoardDates" type="checkbox" value="@boardDate" data-cy="select-projectlist-filter-advisory-board-@boardDate"
@(Model.SelectedAdvisoryBoardDates.Contains(boardDate) ? "checked" : null) />
<label class="govuk-label govuk-checkboxes__label" for="[email protected]()">
@boardDate
</label>
Expand Down

0 comments on commit 907b4f9

Please sign in to comment.