diff --git a/components/edit-collective/tiers/EditTierModal.js b/components/edit-collective/tiers/EditTierModal.js index 02f4b7f9f59..f4f1e7cf277 100644 --- a/components/edit-collective/tiers/EditTierModal.js +++ b/components/edit-collective/tiers/EditTierModal.js @@ -67,14 +67,17 @@ function getTierTypeOptions(intl, collectiveType) { return [...simplifiedTierTypes, membershipTierType]; } -function getReceiptTemplates(host) { +function getReceiptTemplates(intl, host) { const receiptTemplates = host?.settings?.invoice?.templates; const receiptTemplateTitles = []; if (receiptTemplates?.default) { receiptTemplateTitles.push({ value: 'default', - label: receiptTemplates.default.title, + label: intl.formatMessage( + { defaultMessage: '{value} (default)', id: 'OgbGHX' }, + { value: receiptTemplates.default.title }, + ), }); } if (receiptTemplates?.alternative) { @@ -102,7 +105,7 @@ function FormFields({ collective, values, hideTypeSelect }) { }, ]; - const receiptTemplateOptions = getReceiptTemplates(collective.host); + const receiptTemplateOptions = getReceiptTemplates(intl, collective.host); const taxes = getApplicableTaxes(collective, collective.host, values.type); @@ -520,7 +523,7 @@ function FormFields({ collective, values, hideTypeSelect }) { onChange={({ value }) => form.setFieldValue(field.name, value)} isLoading={loading} options={receiptTemplateOptions} - value={receiptTemplateOptions.find(option => option.value === field.value)} + value={receiptTemplateOptions.find(option => option.value === (field.value ?? 'default'))} /> )}