Commit eac70605 authored by Patrick Kimber's avatar Patrick Kimber

Merge branch '3278-link-to-privacy-notice' into 'master'

Update enquiry create mixin to send form_notice

See merge request !4
parents 4bb19eda 0c4fc0c0
Pipeline #22661624 passed with stage
in 2 minutes and 25 seconds
......@@ -5,7 +5,7 @@ from braces.views import LoginRequiredMixin, StaffuserRequiredMixin
from django.db import transaction
from base.view_utils import BaseMixin
from gdpr.models import Consent
from gdpr.models import Consent, ConsentFormSettings
from .forms import EnquiryForm
from .models import Enquiry
......@@ -31,7 +31,12 @@ class EnquiryCreateMixin:
consent_message = ""
if not consent.show_checkbox:
consent_message = consent.message
context.update(dict(consent_message=consent_message))
if hasattr(self, 'consent_form_settings'):
consent_form_settings = ConsentFormSettings.objects.get(
slug=self.consent_form_settings
)
context.update({'form_notice': consent_form_settings.form_notice})
context.update({"consent_message": consent_message})
return context
def get_form_kwargs(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment