Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cold-donuts-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

Add placeholders for gift certificate inputs and remove redundant placeholders in the gift certificate purchase form.
2 changes: 2 additions & 0 deletions core/app/[locale]/(default)/cart/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
],
Expand All @@ -42,22 +40,19 @@ 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,
},
],
{
type: 'textarea',
name: 'message',
label: t('Purchase.Form.messageLabel'),
placeholder: t('Purchase.Form.messagePlaceholder'),
required: false,
},
{
Expand Down Expand Up @@ -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,
},
Expand Down
2 changes: 1 addition & 1 deletion core/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down