From 52aff7f98a2985b4662bf9c1109a424d3200b51f Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Wed, 8 Aug 2018 13:51:45 +0100 Subject: [PATCH] Manually add checkbox data attributes https://github.com/alphagov/govuk-frontend/pull/942 --- app/assets/javascripts/application.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 24f6efe7..ab05ffc0 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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"]')