Skip to content

Commit 38738c1

Browse files
fix: learn more link missing in add question (calcom#25104)
Co-authored-by: Pallav <90088723+Pallava-Joshi@users.noreply.github.com>
1 parent b5dcc7a commit 38738c1

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

packages/features/form-builder/FormBuilder.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ZodError } from "zod";
77

88
import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
99
import { Dialog } from "@calcom/features/components/controlled-dialog";
10+
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
1011
import { getCurrencySymbol } from "@calcom/lib/currencyConversions";
1112
import { useLocale } from "@calcom/lib/hooks/useLocale";
1213
import { md } from "@calcom/lib/markdownIt";
@@ -608,14 +609,22 @@ function FieldEditDialog({
608609
const variantsConfig = fieldForm.watch("variantsConfig");
609610

610611
const fieldTypes = Object.values(fieldTypesConfigMap);
611-
const fieldName = fieldForm.getValues("name");
612612

613613
return (
614614
<Dialog open={dialog.isOpen} onOpenChange={onOpenChange} modal={false}>
615615
<DialogContent className="max-h-none" data-testid="edit-field-dialog" forceOverlayWhenNoModal={true}>
616616
<Form id="form-builder" form={fieldForm} handleSubmit={handleSubmit}>
617617
<div className="h-auto max-h-[85vh] overflow-auto">
618-
<DialogHeader title={t("add_a_booking_question")} subtitle={t("booking_questions_description")} />
618+
<DialogHeader
619+
title={t("add_a_booking_question")}
620+
subtitle={
621+
<LearnMoreLink
622+
t={t}
623+
i18nKey="booking_questions_description"
624+
href="https://cal.com/help/event-types/booking-questions"
625+
/>
626+
}
627+
/>
619628
<SelectField
620629
defaultValue={fieldTypesConfigMap.text}
621630
data-testid="test-field-type"
@@ -883,7 +892,6 @@ function FieldLabel({ field }: { field: RhfFormField }) {
883892
if (fieldsThatSupportLabelAsSafeHtml.includes(field.type)) {
884893
return (
885894
<span
886-
// eslint-disable-next-line react/no-danger
887895
dangerouslySetInnerHTML={{
888896
// Derive from field.label because label might change in b/w and field.labelAsSafeHtml will not be updated.
889897
__html: markdownToSafeHTMLClient(field.label || t(field.defaultLabel || "") || ""),

0 commit comments

Comments
 (0)