Skip to content

Commit

Permalink
Add privacy protection fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dana-cfc4 committed Jan 19, 2023
1 parent 9bbf908 commit 78cb29f
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion src/Blocks/EmbedEEATableauBlock/schema.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,53 @@
const ProtectionSchema = () => ({
title: 'Data Protection',

fieldsets: [
{
id: 'default',
title: 'Default',
fields: [
'privacy_statement',
'privacy_cookie_key',
'enabled',
'background_image',
],
},
],

properties: {
privacy_statement: {
title: 'Privacy statement',
description: 'Defined in template. Change only if necessary',
widget: 'slate_richtext',
className: 'slate-Widget',
},
privacy_cookie_key: {
title: 'Privacy cookie key',
description: 'Use default for Tableau, otherwise change',
defaultValue: 'tableau',
},
enabled: {
title: 'Data protection disclaimer enabled',
description: 'Enable/disable the privacy protection',
type: 'boolean',
},
background_image: {
title: 'Tableau preview image',
widget: 'file',
},
},

required: [],
});

const Schema = (props) => {
return {
title: 'Embed EEA Tableau',
fieldsets: [
{
id: 'default',
title: 'Default',
fields: ['vis_url', 'height', 'show_sources'],
fields: ['vis_url', 'height', 'show_sources', 'dataprotection'],
},
],
properties: {
Expand All @@ -22,6 +64,10 @@ const Schema = (props) => {
title: 'Toggle sources',
type: 'boolean',
},
dataprotection: {
widget: 'object',
schema: ProtectionSchema(),
},
},

required: ['vis_url'],
Expand Down

0 comments on commit 78cb29f

Please sign in to comment.