Problem/Motivation

When withdraw concent, cookie_compliance don't save information that it is a voluntary action by the user.

Drupal.eu_cookie_compliance.withdrawAction = function () {
    Drupal.eu_cookie_compliance.setStatus(null);

    Drupal.eu_cookie_compliance.setAcceptedCategories([]);
    location.reload();
  };

Note : maybe can be port on 8.x branch

Proposed resolution

I propose to save this important information

Drupal.eu_cookie_compliance.withdrawAction = function () {
    Drupal.eu_cookie_compliance.setStatus(0);

    Drupal.eu_cookie_compliance.setAcceptedCategories([]);
    location.reload();
  };

Comments

DrDam created an issue. See original summary.

drdam’s picture

Issue summary: View changes
svenryen’s picture

Status: Active » Needs review

Thanks for the patch. Remember to set status to Needs review when you upload your patch.

svenryen’s picture

Thanks for the patch. I made a few adjustments and tested it with 7.x.

I'm uploading a revised patch, since it's not a good idea to comment out lines we're replacing. The change is well documented in git.

Also ported this to 8.x. Patch is included.

  • svenryen committed 3e172ea on 7.x-1.x
    Issue #3209073 by svenryen, DrDam: Saving "withdrawAction" as "decline...
svenryen’s picture

Status: Needs review » Fixed

  • svenryen committed 4a4bed3 on 8.x-1.x
    Issue #3209073 by svenryen, DrDam: Saving "withdrawAction" as "decline...

  • svenryen committed 3e172ea on 7.x-2.x
    Issue #3209073 by svenryen, DrDam: Saving "withdrawAction" as "decline...
  • svenryen committed 744b0d9 on 7.x-2.x
    Merge branch '7.x-1.x' into 7.x-2.x
    
    * 7.x-1.x:
      Add new file
      Issue #...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.