From 1f67736b75d92eb87d68249cdec3c79926ced643 Mon Sep 17 00:00:00 2001 From: Hamsini Malli Date: Tue, 12 Sep 2023 11:12:29 -0400 Subject: [PATCH] implemented disabled checkboxes (#2329) --- src/components/data_submission/consent_group/EditConsentGroup.js | 1 + src/components/forms/formComponents.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/data_submission/consent_group/EditConsentGroup.js b/src/components/data_submission/consent_group/EditConsentGroup.js index f595d5d0e..dbe9ac65a 100644 --- a/src/components/data_submission/consent_group/EditConsentGroup.js +++ b/src/components/data_submission/consent_group/EditConsentGroup.js @@ -305,6 +305,7 @@ export const EditConsentGroup = (props) => { name: 'gso', type: FormFieldTypes.CHECKBOX, toggleText: 'Genetic studies only (GSO)', + disabled: disableFields, defaultValue: consentGroup.gso, onChange, validation: validation.gso, diff --git a/src/components/forms/formComponents.js b/src/components/forms/formComponents.js index 9a804e22c..1cf82bcea 100644 --- a/src/components/forms/formComponents.js +++ b/src/components/forms/formComponents.js @@ -485,6 +485,7 @@ export const FormInputCheckbox = (config) => { label({ className: `regular-checkbox ${!isValid(validation) ? 'errored' : ''}`, htmlFor: `${id}`, + style: disabled ? { cursor: 'not-allowed' } : null }, [toggleText]) ]); };