Skip to content

Commit

Permalink
Manually add checkbox data attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Aug 10, 2018
1 parent 23f201d commit 52aff7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ var container = $(document.body)
var checkboxGroup = new window.GOVUK.CheckboxGroup()
container.on('click', 'input[type=checkbox][data-check]', checkboxGroup.handle)
container.on('click', 'input[type=checkbox][data-uncheck]', checkboxGroup.handle)

// Add auto uncheck attributes, waiting for https://github.com/alphagov/govuk-frontend/pull/942
$('#employment-status-1').attr('data-uncheck', '["employment-status-3"]')
$('#employment-status-2').attr('data-uncheck', '["employment-status-3"]')
$('#employment-status-3').attr('data-uncheck', '["employment-status-1", "employment-status-2"]')

0 comments on commit 52aff7f

Please sign in to comment.