fix(SW-2073): Links for terms & conditions and privacy policy are moved out of the label for ancillaries and gla

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-04-02 07:53:41 +00:00
parent 1cad7af147
commit b6db9757d8
4 changed files with 60 additions and 40 deletions

View File

@@ -5,6 +5,7 @@
} }
.termsAndConditions { .termsAndConditions {
display: flex; display: grid;
gap: var(--Space-x1); gap: var(--Space-x2);
color: var(--Text-Secondary);
} }

View File

@@ -97,43 +97,48 @@ export default function ConfirmationStep({
</> </>
)} )}
<div className={styles.termsAndConditions}> <div className={styles.termsAndConditions}>
<Typography variant="Body/Supporting text (caption)/smRegular">
<p>
{intl.formatMessage(
{
id: "Yes, I accept the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand that Scandic will process my personal data in accordance with <privacyPolicyLink>Scandic's Privacy policy</privacyPolicyLink>. There you can learn more about what data we process, your rights and where to turn if you have questions.",
},
{
termsAndConditionsLink: (str) => (
<Link
variant="underscored"
color="peach80"
target="_blank"
href={bookingTermsAndConditions[lang]}
>
{str}
</Link>
),
privacyPolicyLink: (str) => (
<Link
variant="underscored"
color="peach80"
target="_blank"
href={privacyPolicy[lang]}
>
{str}
</Link>
),
}
)}
</p>
</Typography>
<Checkbox <Checkbox
className={styles.checkbox}
name="termsAndConditions" name="termsAndConditions"
registerOptions={{ required: true }} registerOptions={{ required: true }}
topAlign
> >
<Typography variant="Body/Supporting text (caption)/smRegular"> <Typography variant="Body/Supporting text (caption)/smRegular">
<p> <span>
{intl.formatMessage( {intl.formatMessage({
{ id: "I accept the terms and conditions",
id: "Yes, I accept the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand that Scandic will process my personal data in accordance with <privacyPolicyLink>Scandic's Privacy policy</privacyPolicyLink>. There you can learn more about what data we process, your rights and where to turn if you have questions.", })}
}, </span>
{
termsAndConditionsLink: (str) => (
<Typography variant="Link/sm">
<Link
variant="underscored"
href={bookingTermsAndConditions[lang]}
target="_blank"
>
{str}
</Link>
</Typography>
),
privacyPolicyLink: (str) => (
<Typography variant="Link/sm">
<Link
variant="underscored"
href={privacyPolicy[lang]}
target="_blank"
>
{str}
</Link>
</Typography>
),
}
)}
</p>
</Typography> </Typography>
</Checkbox> </Checkbox>
</div> </div>

View File

@@ -30,8 +30,9 @@
} }
.termsAndConditions { .termsAndConditions {
display: flex; display: grid;
gap: var(--Spacing-x2); gap: var(--Spacing-x2);
color: var(--Text-Secondary);
} }
.section { .section {

View File

@@ -5,6 +5,8 @@ import { useRouter } from "next/navigation"
import { FormProvider, useForm } from "react-hook-form" import { FormProvider, useForm } from "react-hook-form"
import { useIntl } from "react-intl" import { useIntl } from "react-intl"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { PaymentMethodEnum } from "@/constants/booking" import { PaymentMethodEnum } from "@/constants/booking"
import { import {
bookingTermsAndConditions, bookingTermsAndConditions,
@@ -142,8 +144,8 @@ export default function GuaranteeLateArrival({
label={intl.formatMessage({ id: "Credit card" })} label={intl.formatMessage({ id: "Credit card" })}
/> />
<div className={styles.termsAndConditions}> <div className={styles.termsAndConditions}>
<Checkbox topAlign name={"termsAndConditions"}> <Typography variant="Body/Supporting text (caption)/smRegular">
<Caption> <p>
{intl.formatMessage( {intl.formatMessage(
{ {
id: "By guaranteeing with any of the payment methods available, I accept the terms for this stay and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand Scandic will process my personal data for this stay in accordance with <privacyPolicyLink>Scandics Privacy Policy</privacyPolicyLink>. I accept Scandic requiring a valid credit card during my visit in case anything is left unpaid.", id: "By guaranteeing with any of the payment methods available, I accept the terms for this stay and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand Scandic will process my personal data for this stay in accordance with <privacyPolicyLink>Scandics Privacy Policy</privacyPolicyLink>. I accept Scandic requiring a valid credit card during my visit in case anything is left unpaid.",
@@ -152,8 +154,9 @@ export default function GuaranteeLateArrival({
termsAndConditionsLink: (str) => ( termsAndConditionsLink: (str) => (
<Link <Link
variant="underscored" variant="underscored"
href={bookingTermsAndConditions[lang]} color="peach80"
target="_blank" target="_blank"
href={bookingTermsAndConditions[lang]}
> >
{str} {str}
</Link> </Link>
@@ -161,15 +164,25 @@ export default function GuaranteeLateArrival({
privacyPolicyLink: (str) => ( privacyPolicyLink: (str) => (
<Link <Link
variant="underscored" variant="underscored"
href={privacyPolicy[lang]} color="peach80"
target="_blank" target="_blank"
href={privacyPolicy[lang]}
> >
{str} {str}
</Link> </Link>
), ),
} }
)} )}
</Caption> </p>
</Typography>
<Checkbox name="termsAndConditions">
<Typography variant="Body/Supporting text (caption)/smRegular">
<span>
{intl.formatMessage({
id: "I accept the terms and conditions",
})}
</span>
</Typography>
</Checkbox> </Checkbox>
</div> </div>
<div className={styles.guaranteeCost}> <div className={styles.guaranteeCost}>