klaro-js icon indicating copy to clipboard operation
klaro-js copied to clipboard

Allow for custom Contextual Consent dialog messages

Open roseg43 opened this issue 4 years ago • 1 comments

The problem Currently you can't set custom messages to be shown within the contextual consent dialog. This limits the application of the feature solely to external resources like iframe embeds, content embeds, etc. I'd like to be able to use contextual consent for components like forms that use captchas, using descriptive messages such as "We use spam protection on our forms that requires us to store cookies on your system. Would you like to load this form?"

Proposed solution Add extra settings to the config translations object for contextualConsent translations. If set, this should be used instead of the default text. Field names from the example are taken from the global translations.

Example:

{
    services: [
        {
            purposes: ['security'],
            name: 'recaptcha',
            translations: {
               zz: {
                   contextualConsent: {
                       acceptAlways: "Always allow ReCaptcha",
                       acceptOnce: "I understand, load form",
                       description: 
                        "This form uses third-party spam protection that stores cookies to assist in \
                        verifying that you are not a bot."
                   }
               } 
            }
        }
    ]
}

Additional context I understand that this can be done using watchers, but this strikes me as something that should be supported by the feature, seeing as how other service-related content supports custom translations and content.

roseg43 avatar Jan 18 '21 17:01 roseg43

Hi @roseg43! Ah I see, you want to make the translations configurable for every service? I think that should be doable.

adewes avatar Feb 22 '21 16:02 adewes