From 0792931dec1fee4b877c45716208521224bc49ee Mon Sep 17 00:00:00 2001 From: VarunVAshrit Date: Wed, 20 Nov 2024 15:57:33 +0530 Subject: [PATCH 1/2] :label: Update text snippets and fix pension form translation issue #2681 --- sanityv3/schemas/textSnippets.ts | 20 +++++-------------- .../topicPages/Form/CareerFairForm.tsx | 2 +- .../topicPages/Form/PensionForm.tsx | 10 +++++----- .../careersContactForm/CareersContactForm.tsx | 2 +- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/sanityv3/schemas/textSnippets.ts b/sanityv3/schemas/textSnippets.ts index 487c333d7..8c7f0338a 100644 --- a/sanityv3/schemas/textSnippets.ts +++ b/sanityv3/schemas/textSnippets.ts @@ -163,11 +163,6 @@ const snippets: textSnippet = { defaultValue: 'Please choose one or more of the following', group: groups.subscribeForm, }, - subscribe_form_email: { - title: 'Email', - defaultValue: 'Email', - group: groups.subscribeForm, - }, subscribe_form_general_news: { title: 'General News', defaultValue: 'General News', @@ -241,11 +236,6 @@ const snippets: textSnippet = { 'Want the full picture? We’d love to share this content with you, but first you must accept {type1}, {type2} and {type3} cookies by enabling them in our cookie settings.', group: groups.cookie, }, - contact_form_email: { - title: 'Email', - defaultValue: 'Email *', - group: groups.contactForm, - }, contact_form_category: { title: 'Category', defaultValue: 'Category', @@ -305,6 +295,11 @@ const snippets: textSnippet = { title: 'Pension Category', defaultValue: 'Pension', group: groups.pensionForm, + }, + pension_form_select_topic: { + title: 'Default Pension Category', + defaultValue: 'Pension', + group: groups.pensionForm, }, pension_form_category_travel_insurance: { title: 'Travel Insurance Category', @@ -367,11 +362,6 @@ const snippets: textSnippet = { defaultValue: 'Please enter your phone number', group: groups.careerFairForm, }, - career_fair_form_email: { - title: 'Email', - defaultValue: 'Email', - group: groups.careerFairForm, - }, career_fair_form_event: { title: 'Event', defaultValue: 'Event', diff --git a/web/pageComponents/topicPages/Form/CareerFairForm.tsx b/web/pageComponents/topicPages/Form/CareerFairForm.tsx index bde94b27a..4893a1bf8 100644 --- a/web/pageComponents/topicPages/Form/CareerFairForm.tsx +++ b/web/pageComponents/topicPages/Form/CareerFairForm.tsx @@ -208,7 +208,7 @@ const CareerFairForm = () => { {...props} id={props.name} label={intl.formatMessage({ - id: 'career_fair_form_email', + id: 'email', defaultMessage: 'Email', })} inputRef={ref} diff --git a/web/pageComponents/topicPages/Form/PensionForm.tsx b/web/pageComponents/topicPages/Form/PensionForm.tsx index efe53eed0..d9919044c 100644 --- a/web/pageComponents/topicPages/Form/PensionForm.tsx +++ b/web/pageComponents/topicPages/Form/PensionForm.tsx @@ -144,7 +144,7 @@ const PensionForm = () => { pattern: { value: /^[\w!#$%&'*+/=?`{|}~^-]+(?:\.[\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}$/g, message: intl.formatMessage({ - id: 'pension_form_email_validation', + id: 'email_validation', defaultMessage: 'Please fill out a valid email address', }), }, @@ -188,14 +188,14 @@ const PensionForm = () => { {intl.formatMessage({ id: 'pension_form_select_topic', defaultMessage: 'Select topic' })} @@ -262,7 +262,7 @@ const PensionForm = () => { {isSubmitting ? ( ) : ( - + )} diff --git a/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx b/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx index 4a97dd5e5..37c270af5 100644 --- a/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx +++ b/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx @@ -185,7 +185,7 @@ const CareersContactForm = () => { {...props} id={props.name} label={intl.formatMessage({ - id: 'careers_contact_form_email', + id: 'email', defaultMessage: 'Email', })} inputRef={ref} From 9b3337d2b52f42c6fc061e5fd65f0e78bf939afb Mon Sep 17 00:00:00 2001 From: VarunVAshrit Date: Wed, 20 Nov 2024 16:18:08 +0530 Subject: [PATCH 2/2] Added Asterisk in label --- web/pageComponents/topicPages/Form/CareerFairForm.tsx | 4 ++-- .../topicPages/Form/careersContactForm/CareersContactForm.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/pageComponents/topicPages/Form/CareerFairForm.tsx b/web/pageComponents/topicPages/Form/CareerFairForm.tsx index 4893a1bf8..140833009 100644 --- a/web/pageComponents/topicPages/Form/CareerFairForm.tsx +++ b/web/pageComponents/topicPages/Form/CareerFairForm.tsx @@ -207,10 +207,10 @@ const CareerFairForm = () => { : undefined} helperText={error?.message} diff --git a/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx b/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx index 37c270af5..d6d36749c 100644 --- a/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx +++ b/web/pageComponents/topicPages/Form/careersContactForm/CareersContactForm.tsx @@ -184,10 +184,10 @@ const CareersContactForm = () => { : undefined} helperText={error?.message}