DirkPersky / typo3-dp_cookieconsent

TYPO3 Extension: Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)
GNU Affero General Public License v3.0
32 stars 27 forks source link

add configurable checkboxes #26

Closed mario-seidel closed 5 years ago

mario-seidel commented 5 years ago

With this feature you can add or modify the checkbox types by configuration. All you have to do is setting your new checkbox in TS and add it to the partial template:

Configuration/TypoScript/setup.txt:

        checkboxes {
            statistics = {$plugin.tx_cookieconsent.settings.statistics}
            marketing = {$plugin.tx_cookieconsent.settings.marketing}
            thirdparty = {$plugin.tx_cookieconsent.settings.thirdparty}
        }

Resources/Private/Partials/CookieSelection.html:

    <label for="dp--cookie-thirdparty">
        <f:form.checkbox id="dp--cookie-thirdparty" class="dp--check-box" checked="{settings.checkboxes.thirdparty}" value="" />
        <f:translate key="dpThirdparty" extensionName="dp_cookieconsent" />
    </label>