Harborn-digital / cookie-consent-bundle

Symfony bundle to append Cookie Consent to your website to comply to AVG/GDPR for cookies.
MIT License
18 stars 18 forks source link

Simplified + complex version at the same time #91

Open Yoann-VINCENT opened 3 years ago

Yoann-VINCENT commented 3 years ago

Hi ! First of all, thanks for this great bundle ! However I was wondering if it was possible to make both simplified and complex version coexist ? I manage to display all three buttons, but 'save' will only work with simplified on false and the other two with simplified on true. Therefore I deleted all occurences of the simplified option, but the problem persists, as if the option was always set on false... Do you have any idea ? Thanks !

dduenker commented 3 years ago

You have to modify CookieConsentType for this: https://github.com/ConnectHolland/cookie-consent-bundle/blob/master/Form/CookieConsentType.php#L62 Note, that not only do you have to add the button via the builder, but also modify the function listening to PRE_SUBMIT, as it currently only checks, whether all cookies should be saved or not.