Skip to content

Commit

Permalink
DWPF-1517 Removal of cookie banner (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicopicchio authored May 13, 2024
1 parent 5ff6466 commit 9f47e45
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 56 deletions.
1 change: 0 additions & 1 deletion assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ $moj-assets-path: "/static/moj-frontend/";
@import "components/accordion";
@import "components/content_cards";
@import "components/content_page";
@import "components/cookie_bar";
@import "components/home";
@import "components/home_new";
@import "components/layout";
Expand Down
9 changes: 0 additions & 9 deletions assets/stylesheets/components/_cookie_bar.scss

This file was deleted.

1 change: 0 additions & 1 deletion pii-ner-exclude.txt
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ SD
SE
search_and_profile_bar.html
search_keyword_or_phrase__pk
seen_cookie_banner
self.seo_title
SerializerMethodField
Server-Authorization'
Expand Down
2 changes: 0 additions & 2 deletions src/content/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

from content import blocks
from content.utils import manage_excluded, manage_pinned, truncate_words_and_chars
from core.utils import set_seen_cookie_banner
from extended_search.index import DWIndexedField as IndexedField
from extended_search.index import Indexed
from peoplefinder.widgets import PersonChooser
Expand Down Expand Up @@ -81,7 +80,6 @@ class BasePage(Page, Indexed):

def serve(self, request):
response = super().serve(request)
set_seen_cookie_banner(request, response)

return response

Expand Down
2 changes: 0 additions & 2 deletions src/core/templates/includes/header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% load menu_tags waffle_tags %}
{% load render_bundle webpack_static from webpack_loader %}
{% load cookie_banner %}
{% load site_alert %}

<header class="govuk-header govuk-header--ws search-v2"
Expand Down Expand Up @@ -48,7 +47,6 @@
</div>
</div>
</header>
{% cookie_banner %}
{% if FEATURE_FLAGS.new_homepage %}
{% else %}
{% if USER_IS_AUTHENTICATED %}
Expand Down
15 changes: 0 additions & 15 deletions src/core/templates/tags/cookie_banner.html

This file was deleted.

13 changes: 0 additions & 13 deletions src/core/templatetags/cookie_banner.py

This file was deleted.

9 changes: 0 additions & 9 deletions src/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
from core.models import FeatureFlag


def set_seen_cookie_banner(request, response):
if not request.COOKIES.get("seen_cookie_banner"):
response.set_cookie(
"seen_cookie_banner",
1,
secure=False,
)


def get_all_feature_flags(request):
return {
flag.name: flag_is_active(request, flag.name)
Expand Down
4 changes: 0 additions & 4 deletions src/news/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from wagtail.snippets.models import register_snippet

from content.models import BasePage
from core.utils import set_seen_cookie_banner
from extended_search.index import DWIndexedField as IndexedField
from news.forms import CommentForm
from working_at_dit.models import PageWithTopics
Expand Down Expand Up @@ -215,7 +214,6 @@ def serve(self, request, *args, **kwargs):
context["comment_form"] = CommentForm()

response = TemplateResponse(request, self.template, context)
set_seen_cookie_banner(request, response)

return response

Expand Down Expand Up @@ -243,7 +241,6 @@ def news_home(self, request):
self.get_template(request),
context,
)
set_seen_cookie_banner(request, response)

return response

Expand All @@ -257,7 +254,6 @@ def category_home(self, request, category_slug):
self.get_template(request),
context,
)
set_seen_cookie_banner(request, response)

return response

Expand Down

0 comments on commit 9f47e45

Please sign in to comment.