From 41bfc75f9d74597f5678100bf2584db85f11c5f2 Mon Sep 17 00:00:00 2001 From: Montse Ortega Date: Mon, 2 Dec 2024 14:23:54 +0100 Subject: [PATCH 01/10] Disable login button if user don't want to share data (#49) Signed-off-by: Montse Ortega --- apps/agent/src/login-form/LoginForm.tsx | 4 +++- apps/agent/src/login-form/hooks/UseViewModel.ts | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/agent/src/login-form/LoginForm.tsx b/apps/agent/src/login-form/LoginForm.tsx index f117d38..eb2ae6d 100644 --- a/apps/agent/src/login-form/LoginForm.tsx +++ b/apps/agent/src/login-form/LoginForm.tsx @@ -174,6 +174,8 @@ export const LoginForm: React.FC = (props) => { name="isDataSharingAllowed" label="I agree to share aggregated data about my environment with Red Hat." aria-label="Share aggregated data" + onChange={(_event,checked)=>vm.handleChangeDataSharingAllowed(checked)} + isChecked={vm.isDataSharingChecked} /> @@ -236,7 +238,7 @@ export const LoginForm: React.FC = (props) => {