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

How to remove unneccesary checkboxes #29

Closed m10a closed 4 years ago

m10a commented 4 years ago

How can I remove an unneccesary checkbox like "marketing", if I don't need it?

If I remove the label in the partial, I geht the following errors in the Javascript Console:

"Uncaught TypeError: Cannot set property 'checked' of null" "Uncaught TypeError: Cannot set property 'id' of null"

Do I have to deactivate the Checkbox anywhere else in Typoscript?

DirkPersky commented 4 years ago

he for that you need to remove that setting from the typoscript

page.headerData.998.settings.checkboxes.marketing > ^^ i hope that works, dont tested.

m10a commented 4 years ago

he for that you need to remove that setting from the typoscript

page.headerData.998.settings.checkboxes.marketing > ^^ i hope that works, dont tested.

This does not work. Error keeps the same. Imo this setting is responsible for prefilling of the checkbox not for deactivating of it.

DirkPersky commented 4 years ago

'lib.dp_cookieconsent.settings.checkboxes.marketing >' than shoud remove the prefill.

m10a commented 4 years ago

I don't want to remove the prefill, but the checkbox itself. If I do this in the fluid partial, I get the error mentioned above.

DirkPersky commented 4 years ago

yeah i know and that remove of the prefill shoud fix you error

DirkPersky commented 4 years ago

i tried it today (with the new dev version) and that works with

typoscript

lib.dp_cookieconsent.settings.checkboxes.marketing >

template

<div class="dp--cookie-check" xmlns:f="http://www.w3.org/1999/html">
    <label for="dp--cookie-require">
        <f:form.checkbox id="dp--cookie-require" class="dp--check-box" value="" disabled="disabled" checked="true" />
        <f:translate key="dpRequire" extensionName="dp_cookieconsent" />
    </label>
    <label for="dp--cookie-statistics">
        <f:form.checkbox id="dp--cookie-statistics" class="dp--check-box" checked="{settings.checkboxes.statistics}" value="" />
        <f:translate key="dpStatistik" extensionName="dp_cookieconsent" />
    </label>
</div>
DirkPersky commented 4 years ago

shoud work with the last release too

m10a commented 4 years ago

i tried it today (with the new dev version) and that works with

typoscript

lib.dp_cookieconsent.settings.checkboxes.marketing >

Hi, with this it works for me too. Thanks! Can you include it in the docu?

DirkPersky commented 4 years ago

I hope this is fine for you

F.A.Q.

Some F.A.Q. can be found here

m10a commented 4 years ago

oh, not just for me but for anybody who run in the same problem ;-)

I think it would be better, if you place it in the "Dynamic Checkboxes"-Section of your Readme. Who takes note of the Wiki?

And no, it's not just about the "preffill" It's about removing the entire checkbox. I think you should not only describe in your Readme, how one can add a checkbox but also how to remove one.

p410n3 commented 4 years ago

I think it would be better, if you place it in the "Dynamic Checkboxes"-Section of your Readme. Who takes note of the Wiki?

May I propose to link the wiki in the README? A wiki is very comfortable, and putting every edge-case inside the README makes it quite messy. This way people will take note of the wiki.

Kind regards,

Phillip