82 lines
2.8 KiB
JavaScript
82 lines
2.8 KiB
JavaScript
/**
|
|
* Fields for the Notifications global — localized user-facing texts for action
|
|
* results (form submission outcomes, and future contexts). Every text is
|
|
* localized: true so each language has its own value. Empty fields fall back to
|
|
* built-in English defaults (see modules/notifications/defaults).
|
|
*
|
|
* Grouped per context. `form` holds the outcomes of submitForm; more groups
|
|
* (e.g. `newsletter`, `system`) can be added the same way without touching
|
|
* consumers — getNotificationTexts resolves whatever exists, falling back
|
|
* per field.
|
|
*/ export const notificationsFields = [
|
|
{
|
|
name: 'form',
|
|
type: 'group',
|
|
admin: {
|
|
description: 'Messages shown after a form is submitted. Leave a field empty to use the built-in default.'
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'success',
|
|
type: 'text',
|
|
admin: {
|
|
placeholder: 'Thank you — your message has been sent.'
|
|
},
|
|
localized: true
|
|
},
|
|
{
|
|
name: 'error',
|
|
type: 'text',
|
|
admin: {
|
|
placeholder: 'Something went wrong. Please try again later.'
|
|
},
|
|
localized: true
|
|
},
|
|
{
|
|
name: 'rateLimited',
|
|
type: 'text',
|
|
admin: {
|
|
placeholder: 'Too many attempts. Please wait a moment and try again.'
|
|
},
|
|
localized: true
|
|
},
|
|
{
|
|
name: 'turnstile',
|
|
type: 'text',
|
|
admin: {
|
|
placeholder: 'Captcha verification failed. Please try again.'
|
|
},
|
|
localized: true
|
|
},
|
|
{
|
|
name: 'validation',
|
|
type: 'text',
|
|
admin: {
|
|
description: 'Shown on a validation error. Use {field} to insert the offending field name.',
|
|
placeholder: 'Please check the {field} field and try again.'
|
|
},
|
|
localized: true
|
|
},
|
|
{
|
|
name: 'consent',
|
|
type: 'text',
|
|
admin: {
|
|
description: 'Shown when the GDPR consent checkbox is left unchecked.',
|
|
placeholder: 'Please accept the privacy policy to continue.'
|
|
},
|
|
localized: true
|
|
},
|
|
{
|
|
name: 'notFound',
|
|
type: 'text',
|
|
admin: {
|
|
placeholder: 'This form is no longer available.'
|
|
},
|
|
localized: true
|
|
}
|
|
],
|
|
label: 'Form messages'
|
|
}
|
|
];
|
|
|
|
//# sourceMappingURL=fields.js.map
|