diff --git a/.changeset/cold-donuts-double.md b/.changeset/cold-donuts-double.md new file mode 100644 index 0000000000..df347e32eb --- /dev/null +++ b/.changeset/cold-donuts-double.md @@ -0,0 +1,5 @@ +--- +"@bigcommerce/catalyst-core": patch +--- + +Add placeholders for gift certificate inputs and remove redundant placeholders in the gift certificate purchase form. diff --git a/core/app/[locale]/(default)/cart/page.tsx b/core/app/[locale]/(default)/cart/page.tsx index ff45b25c8d..677f74523e 100644 --- a/core/app/[locale]/(default)/cart/page.tsx +++ b/core/app/[locale]/(default)/cart/page.tsx @@ -66,6 +66,7 @@ export default async function Cart({ params }: Props) { setRequestLocale(locale); const t = await getTranslations('Cart'); + const tGiftCertificates = await getTranslations('GiftCertificates'); const format = await getFormatter(); const cartId = await getCartId(); @@ -281,6 +282,7 @@ export default async function Cart({ params }: Props) { giftCertificateCodes: checkout?.giftCertificates.map((gc) => gc.code) ?? [], ctaLabel: t('GiftCertificate.apply'), label: t('GiftCertificate.giftCertificateCode'), + placeholder: tGiftCertificates('CheckBalance.inputPlaceholder'), removeLabel: t('GiftCertificate.removeGiftCertificate'), } : undefined diff --git a/core/app/[locale]/(default)/gift-certificates/purchase/page.tsx b/core/app/[locale]/(default)/gift-certificates/purchase/page.tsx index 7b78bed80e..07edaab6a9 100644 --- a/core/app/[locale]/(default)/gift-certificates/purchase/page.tsx +++ b/core/app/[locale]/(default)/gift-certificates/purchase/page.tsx @@ -26,14 +26,12 @@ function getFields( type: 'text', name: 'senderName', label: `${t('Purchase.Form.senderNameLabel')} *`, - placeholder: t('Purchase.Form.namePlaceholder'), required: true, }, { type: 'email', name: 'senderEmail', label: `${t('Purchase.Form.senderEmailLabel')} *`, - placeholder: t('Purchase.Form.emailPlaceholder'), required: true, }, ], @@ -42,14 +40,12 @@ function getFields( type: 'text', name: 'recipientName', label: `${t('Purchase.Form.recipientNameLabel')} *`, - placeholder: t('Purchase.Form.namePlaceholder'), required: true, }, { type: 'email', name: 'recipientEmail', label: `${t('Purchase.Form.recipientEmailLabel')} *`, - placeholder: t('Purchase.Form.emailPlaceholder'), required: true, }, ], @@ -57,7 +53,6 @@ function getFields( type: 'textarea', name: 'message', label: t('Purchase.Form.messageLabel'), - placeholder: t('Purchase.Form.messagePlaceholder'), required: false, }, { @@ -87,7 +82,6 @@ function getFields( minAmount: String(giftCertificateSettings.minimumAmount.value), maxAmount: String(giftCertificateSettings.maximumAmount.value), })} *`, - placeholder: t('Purchase.Form.customAmountPlaceholder'), pattern: '^[0-9]*\\.?[0-9]+$', required: true, }, diff --git a/core/messages/en.json b/core/messages/en.json index 5a663c6a74..640f4216a3 100644 --- a/core/messages/en.json +++ b/core/messages/en.json @@ -574,7 +574,7 @@ "title": "Check balance", "description": "You can check the balance and get the information about your gift certificate by typing the code in the box below.", "inputLabel": "Code", - "inputPlaceholder": "Enter code", + "inputPlaceholder": "xxx-xxx-xxx-xxx", "purchasedDateLabel": "Purchased", "senderLabel": "From", "Errors": {