Commit a8b3ca26 authored by Sven Berg Ryen's avatar Sven Berg Ryen
Browse files

Issue #2985390 by Anybody, svenryen, jo.st, flefle, portulaca, MrPaulDriver,...

Issue #2985390 by Anybody, svenryen, jo.st, flefle, portulaca, MrPaulDriver, tijsdeboeck, leymannx, upunkt, bramvandenbulcke, gabrimonfa, Grayle, RobbM, anderz: [1.x] Option to place Withdraw Button anywhere on site (e.g. in block)
parent 38e46184
Loading
Loading
Loading
Loading
+3 −6
Changes for src/Plugin/Block/CookieSettingsButtonBlock.php: 3 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -31,18 +31,15 @@ class CookieSettingsButtonBlock extends BlockBase {
    $config = \Drupal::config('eu_cookie_compliance.settings');
    if ($config->get('withdraw_enabled')) {
      return [
        '#type' => 'link',
        '#title' => $this->t('Cookie settings'),
        '#type' => 'button',
        '#value' => $this->t('Cookie settings'),
        '#url' => Url::fromUserInput('#sliding-popup'),
        '#options' => [
          'attributes' => [
        '#attributes' => [
          'class' => [
            'eu-cookie-compliance-toggle-withdraw-banner',
              'button',
          ],
          'onclick' => 'if (Drupal.eu_cookie_compliance) { Drupal.eu_cookie_compliance.toggleWithdrawBanner(); } return false;',
        ],
        ],
      ];
    }
    else {