From eeda32993d4d5dca6b2ade670e01e5f41cfd3e35 Mon Sep 17 00:00:00 2001
From: Catalin Pit <25515812+catalinpit@users.noreply.github.com>
Date: Thu, 23 Jan 2025 15:35:38 +0200
Subject: [PATCH 1/3] chore: add label for radio field
---
.../radio-field.tsx | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx b/packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
index 04529098a4..2c93847f03 100644
--- a/packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
+++ b/packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
@@ -2,7 +2,8 @@
import { useEffect, useState } from 'react';
-import { Trans } from '@lingui/macro';
+import { Trans, msg } from '@lingui/macro';
+import { useLingui } from '@lingui/react';
import { ChevronDown, ChevronUp, Trash } from 'lucide-react';
import { validateRadioField } from '@documenso/lib/advanced-fields-validation/validate-radio';
@@ -27,6 +28,8 @@ export const RadioFieldAdvancedSettings = ({
handleFieldChange,
handleErrors,
}: RadioFieldAdvancedSettingsProps) => {
+ const { _ } = useLingui();
+
const [showValidation, setShowValidation] = useState(false);
const [values, setValues] = useState(
fieldState.values ?? [{ id: 1, checked: false, value: 'Default value' }],
@@ -102,6 +105,18 @@ export const RadioFieldAdvancedSettings = ({
return (
+
+
+ handleFieldChange('label', e.target.value)}
+ />
+
Date: Thu, 23 Jan 2025 16:33:05 +0200
Subject: [PATCH 2/3] chore: add label for checkbox field
---
.../field-items-advanced-settings/checkbox-field.tsx | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx b/packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
index d936adc3b8..e0596f8623 100644
--- a/packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
+++ b/packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
@@ -126,6 +126,18 @@ export const CheckboxFieldAdvancedSettings = ({
return (
+
+
+ handleFieldChange('label', e.target.value)}
+ />
+