Files
ipal-kit/dist/globals/CookieSettings/fields.js
T
2026-07-31 23:21:51 +02:00

87 lines
2.2 KiB
JavaScript

import { CONSENT_CATEGORIES } from '../../modules/consent/index.js';
/**
* Fields for the CookieSettings global — GDPR consent banner copy, editable
* per locale. The privacy-policy link is NOT stored here: it comes from the
* pages module (system page role 'privacyPolicy'), keeping one source of truth.
*/ export const cookieSettingsFields = [
{
name: 'message',
type: 'textarea',
admin: {
description: 'Main consent message shown in the banner.'
},
localized: true
},
{
name: 'settingsTitle',
type: 'text',
admin: {
description: 'Heading for the detailed settings panel.'
},
localized: true
},
{
name: 'buttons',
type: 'group',
admin: {
description: 'Button labels.'
},
fields: [
{
name: 'acceptAll',
type: 'text',
localized: true
},
{
name: 'reject',
type: 'text',
localized: true
},
{
name: 'settings',
type: 'text',
localized: true
},
{
name: 'save',
type: 'text',
localized: true
},
{
name: 'back',
type: 'text',
localized: true
}
]
},
{
name: 'categories',
type: 'array',
admin: {
description: 'Per-category titles and descriptions.'
},
fields: [
{
name: 'key',
type: 'select',
options: CONSENT_CATEGORIES.map((c)=>({
label: c,
value: c
})),
required: true
},
{
name: 'title',
type: 'text',
localized: true
},
{
name: 'description',
type: 'textarea',
localized: true
}
]
}
];
//# sourceMappingURL=fields.js.map