fix: learn more link missing in add question (#25104)

Co-authored-by: Pallav <90088723+Pallava-Joshi@users.noreply.github.com>
This commit is contained in:
Dhairyashil Shinde
2025-11-14 04:57:31 +05:30
committed by GitHub
co-authored by Pallav
parent b5dcc7a991
commit 38738c1a3a
+11 -3
View File
@@ -7,6 +7,7 @@ import { ZodError } from "zod";
import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
import { Dialog } from "@calcom/features/components/controlled-dialog";
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
import { getCurrencySymbol } from "@calcom/lib/currencyConversions";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { md } from "@calcom/lib/markdownIt";
@@ -608,14 +609,22 @@ function FieldEditDialog({
const variantsConfig = fieldForm.watch("variantsConfig");
const fieldTypes = Object.values(fieldTypesConfigMap);
const fieldName = fieldForm.getValues("name");
return (
<Dialog open={dialog.isOpen} onOpenChange={onOpenChange} modal={false}>
<DialogContent className="max-h-none" data-testid="edit-field-dialog" forceOverlayWhenNoModal={true}>
<Form id="form-builder" form={fieldForm} handleSubmit={handleSubmit}>
<div className="h-auto max-h-[85vh] overflow-auto">
<DialogHeader title={t("add_a_booking_question")} subtitle={t("booking_questions_description")} />
<DialogHeader
title={t("add_a_booking_question")}
subtitle={
<LearnMoreLink
t={t}
i18nKey="booking_questions_description"
href="https://cal.com/help/event-types/booking-questions"
/>
}
/>
<SelectField
defaultValue={fieldTypesConfigMap.text}
data-testid="test-field-type"
@@ -883,7 +892,6 @@ function FieldLabel({ field }: { field: RhfFormField }) {
if (fieldsThatSupportLabelAsSafeHtml.includes(field.type)) {
return (
<span
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
// Derive from field.label because label might change in b/w and field.labelAsSafeHtml will not be updated.
__html: markdownToSafeHTMLClient(field.label || t(field.defaultLabel || "") || ""),