diff --git a/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml b/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml index 0b067b6e..e016d761 100644 --- a/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml +++ b/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml @@ -1,4 +1,4 @@ -@page "{id:int?}" +@page "{id:int?}" @model UDS.Net.Forms.Pages.UDS3.D1Model @{ Layout = "_LayoutForm"; @@ -46,7 +46,7 @@ -
+
@@ -292,7 +292,7 @@
- +
@@ -345,7 +345,7 @@
- @Html.CheckBox("D1.MCIAPLUS", Model.D1.MCIAPLUS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MCIAPLAN\" , \"D1.MCIAPATT\" , \"D1.MCIAPEX\" ,\"D1.MCIAPVIS\" ]",data_fancycheckboxes_target= "checkbox" }) + @Html.CheckBox("D1.MCIAPLUS", Model.D1.MCIAPLUS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MCIAPLAN\", \"D1.MCIAPATT\",\"D1.MCIAPEX\",\"D1.MCIAPVIS\"]", data_fancycheckboxes_target= "checkbox" })
@@ -413,7 +413,7 @@
- @Html.CheckBox("D1.MCINON1", Model.D1.MCINON1, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MCIN1LAN\" , \"D1.MCIN1ATT\" , \"D1.MCIN1EX\" ,\"D1.MCIN1VIS\" ]",data_fancycheckboxes_target= "checkbox" }) + @Html.CheckBox("D1.MCINON1", Model.D1.MCINON1, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MCIN1LAN\" , \"D1.MCIN1ATT\" , \"D1.MCIN1EX\" ,\"D1.MCIN1VIS\" ]", data_fancycheckboxes_target= "checkbox" })
diff --git a/src/UDS.Net.Forms/wwwroot/js/js_controllers/fancycheckboxes_controller.js b/src/UDS.Net.Forms/wwwroot/js/js_controllers/fancycheckboxes_controller.js index 457a952f..d5d30b7e 100644 --- a/src/UDS.Net.Forms/wwwroot/js/js_controllers/fancycheckboxes_controller.js +++ b/src/UDS.Net.Forms/wwwroot/js/js_controllers/fancycheckboxes_controller.js @@ -1,24 +1,21 @@ import { Controller } from '@hotwired/stimulus'; export default class extends Controller { - static targets = ['checkbox'] + static targets = ['checkbox'] - connect() { - this.checkboxTargets.forEach((checkbox) => { - checkbox.addEventListener('change', () => this.checkboxChange(checkbox)) - }) - } + connect() { + this.checkboxTargets.forEach((checkbox) => { + checkbox.addEventListener('click', () => this.checkboxChange(checkbox)) + }) + } - checkboxChange(selectedCheckbox) { - this.checkboxTargets.forEach((checkbox) => { - if (checkbox !== selectedCheckbox) { - checkbox.checked = false; - checkbox.disabled = false; - } - }) + checkboxChange(selectedCheckbox) { + this.checkboxTargets.forEach((checkbox) => { + if (checkbox !== selectedCheckbox) { + checkbox.checked = false; + checkbox.dispatchEvent(new Event('change')) + } + }) - if (selectedCheckbox.checked) { - selectedCheckbox.disabled = false; - } - } + } } \ No newline at end of file
Select one syndrome from 5a-5e as being Present (all others will default to Absent in the NACC database), and then CONTINUE TO QUESTION 6. If you select MCI below, it should meet the MCI core clinical criteria outlined above.