Commit 0c4fc0c0 authored by Malcolm's avatar Malcolm

Update enquiry create mixin to send form_notice

parent 4bb19eda
Pipeline #22660791 failed with stage
in 1 minute and 28 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
if hasattr(self, 'consent_form_settings'):
consent_form_settings = ConsentFormSettings.objects.get(
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