Skip to content

Commit

Permalink
Merge branch 'malj/2334' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia committed Jul 15, 2024
2 parents 2190cb8 + efe7c23 commit 72bf1b5
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 12 deletions.
16 changes: 13 additions & 3 deletions sanityv3/schemas/textSnippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ export const groups = {
others: { title: 'Others' },
}
const snippets: textSnippet = {
country_code_format: {
title: 'e.g. +47',
defaultValue: 'e.g. +47',
group: groups.form,
},
all_fields_mandatory: {
title: 'All fields with * are mandatory',
defaultValue: 'All fields with * are mandatory',
group: groups.form,
},
loading: {
title: 'Loading',
defaultValue: 'Loading...',
Expand Down Expand Up @@ -189,7 +199,7 @@ const snippets: textSnippet = {
},
contact_form_name: {
title: 'Name',
defaultValue: 'Name',
defaultValue: 'Name *',
group: groups.contactForm,
},
contact_form_name_placeholder: {
Expand All @@ -199,7 +209,7 @@ const snippets: textSnippet = {
},
contact_form_email: {
title: 'Email',
defaultValue: 'Email',
defaultValue: 'Email *',
group: groups.contactForm,
},
contact_form_name_validation: {
Expand Down Expand Up @@ -471,7 +481,7 @@ const snippets: textSnippet = {
},
careers_contact_form_name: {
title: 'Name',
defaultValue: 'Your Name',
defaultValue: 'Your Name *',
group: groups.careerContactForm,
},

Expand Down
24 changes: 20 additions & 4 deletions web/pageComponents/topicPages/Form/CareerFairForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,23 @@ const CareerFairForm = () => {
<FormTextField
{...props}
id={props.name}
label={intl.formatMessage({
id: ' career_fair_form_phone',
defaultMessage: 'Phone Number',
})}
label={
<>
<span>
{intl.formatMessage({
id: ' career_fair_form_phone',
defaultMessage: 'Phone Number',
})}
</span>
<br />
<span className="text-xs">
{intl.formatMessage({
id: 'country_code_format',
defaultMessage: 'e.g. +47',
})}
</span>
</>
}
inputRef={ref}
inputIcon={invalid ? <Icon data={error_filled} title="error" /> : undefined}
helperText={error?.message}
Expand Down Expand Up @@ -306,6 +319,9 @@ const CareerFairForm = () => {
/>
)}
/>
<div className="pb-4 text-xs italic">
<FormattedMessage id="all_fields_mandatory" defaultMessage="All fields with * are mandatory" />
</div>
<StyledCheckBox
label={intl.formatMessage({
id: 'career_fair_form_supporting_documents',
Expand Down
4 changes: 3 additions & 1 deletion web/pageComponents/topicPages/Form/ContactEquinorForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ const ContactEquinorForm = (props: ContactEquinorFormProps) => {
)
}}
/>

<div className="pb-4 text-xs italic">
<FormattedMessage id="all_fields_mandatory" defaultMessage="All fields with * are mandatory" />
</div>
<FriendlyCaptcha
doneCallback={() => {
setSubmitButtonEnabled(true)
Expand Down
3 changes: 3 additions & 0 deletions web/pageComponents/topicPages/Form/OrderReportsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ const OrderReportsForm = () => {
/>
)}
/>
<div className="pb-4 text-xs italic">
<FormattedMessage id="all_fields_mandatory" defaultMessage="All fields with * are mandatory" />
</div>
<FriendlyCaptcha
doneCallback={() => {
setSubmitButtonEnabled(true)
Expand Down
3 changes: 3 additions & 0 deletions web/pageComponents/topicPages/Form/SubscribeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ const SubscribeForm = () => {
/>
)}
/>
<div className="pb-4 text-xs italic">
<FormattedMessage id="all_fields_mandatory" defaultMessage="All fields with * are mandatory" />
</div>
<FriendlyCaptcha
doneCallback={() => {
setSubmitButtonEnabled(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,23 @@ const CareersContactForm = () => {
<FormTextField
{...props}
id={props.name}
label={intl.formatMessage({
id: 'careers_contact_form_phone',
defaultMessage: 'Phone Number',
})}
label={
<>
<span>
{intl.formatMessage({
id: 'careers_contact_form_phone',
defaultMessage: 'Phone Number',
})}
</span>
<br />
<span className="text-xs">
{intl.formatMessage({
id: 'country_code_format',
defaultMessage: 'e.g. +47',
})}
</span>
</>
}
placeholder={intl.formatMessage({
id: 'careers_contact_form_phone_placeholder',
defaultMessage: 'Country code and phone number',
Expand Down Expand Up @@ -347,6 +360,9 @@ const CareersContactForm = () => {
/>
)}
/>
<div className="pb-4 text-xs italic">
<FormattedMessage id="all_fields_mandatory" defaultMessage="All fields with * are mandatory" />
</div>
<StyledCheckBox
label={intl.formatMessage({
id: 'career_fair_form_supporting_documents',
Expand Down

0 comments on commit 72bf1b5

Please sign in to comment.