diff --git a/lms/envs/common.py b/lms/envs/common.py index 48ccba756f..639eca3c81 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -367,6 +367,10 @@ FEATURES = { # Allow public account creation 'ALLOW_PUBLIC_ACCOUNT_CREATION': True, + + # Enable footer banner for cookie consent. + # See https://cookieconsent.insites.com/ for more. + 'ENABLE_COOKIE_CONSENT': False, } # Ignore static asset files on import which match this pattern diff --git a/lms/templates/footer.html b/lms/templates/footer.html index b0e9fa85f2..21748dea84 100644 --- a/lms/templates/footer.html +++ b/lms/templates/footer.html @@ -83,3 +83,7 @@ % endfor % endif + +% if settings.FEATURES.get('ENABLE_COOKIE_CONSENT', False): + <%include file="widgets/cookie-consent.html" /> +% endif diff --git a/lms/templates/widgets/cookie-consent.html b/lms/templates/widgets/cookie-consent.html new file mode 100644 index 0000000000..91d07b8cbe --- /dev/null +++ b/lms/templates/widgets/cookie-consent.html @@ -0,0 +1,46 @@ + +<%page expression_filter="h"/> +<%! from django.utils.translation import ugettext as _ %> +<%namespace name='static' file='../static_content.html'/> + + + + +