diff --git a/RIGS/forms.py b/RIGS/forms.py index 77e504eb..752b7fb8 100644 --- a/RIGS/forms.py +++ b/RIGS/forms.py @@ -149,7 +149,7 @@ class BaseClientEventAuthorisationForm(forms.ModelForm): def clean(self): if self.cleaned_data.get('amount') != self.instance.event.total: - self.add_error('amount', 'The amount authorised must equal the total for the event.') + self.add_error('amount', 'The amount authorised must equal the total for the event (inc VAT).') return super(BaseClientEventAuthorisationForm, self).clean() class Meta: diff --git a/RIGS/rigboard.py b/RIGS/rigboard.py index 61ebc3a7..ecd15842 100644 --- a/RIGS/rigboard.py +++ b/RIGS/rigboard.py @@ -147,7 +147,7 @@ class EventPrint(generic.View): merger = PdfFileMerger() - context = RequestContext(request, { # this should be outside the loop, but bug in 1.8.2 prevents this + context = RequestContext(request, { 'object': object, 'fonts': { 'opensans': { @@ -227,7 +227,8 @@ class EventAuthorise(generic.UpdateView): self.template_name = self.success_template messages.add_message(self.request, messages.SUCCESS, - 'Success! Your event has been authorised. You will also receive email confirmation.') + 'Success! Your event has been authorised. ' + + 'You will also receive email confirmation to %s.' % (self.object.email)) return self.render_to_response(self.get_context_data()) @property @@ -259,10 +260,11 @@ class EventAuthorise(generic.UpdateView): if self.get_object() is not None and self.get_object().pk is not None: if self.event.authorised: messages.add_message(self.request, messages.WARNING, - "This event has already been authorised. Please confirm you wish to reauthorise") + "This event has already been authorised. " + "Reauthorising is not necessary at this time.") else: messages.add_message(self.request, messages.WARNING, - "This event has already been authorised, but the amount has changed." + + "This event has already been authorised, but the amount has changed. " + "Please check the amount and reauthorise.") return super(EventAuthorise, self).get(request, *args, **kwargs) @@ -280,7 +282,7 @@ class EventAuthorise(generic.UpdateView): request.email = data['email'] except (signing.BadSignature, AssertionError, KeyError): raise SuspiciousOperation( - "The security integrity of that URL is invalid. Please contact your event MIC to obtain a new URL") + "This URL is invalid. Please ask your TEC contact for a new URL") return super(EventAuthorise, self).dispatch(request, *args, **kwargs) @@ -320,6 +322,7 @@ class EventAuthorisationRequest(generic.FormView, generic.detail.SingleObjectMix "N%05d | %s - Event Authorisation Request" % (self.object.pk, self.object.name), get_template("RIGS/eventauthorisation_client_request.txt").render(context), to=[email], + reply_to=[settings.AUTHORISATION_NOTIFICATION_ADDRESS], ) msg.send() diff --git a/RIGS/signals.py b/RIGS/signals.py index 42bb6504..6aac2388 100644 --- a/RIGS/signals.py +++ b/RIGS/signals.py @@ -52,7 +52,8 @@ def send_eventauthorisation_success_email(instance): client_email = EmailMessage( subject, get_template("RIGS/eventauthorisation_client_success.txt").render(context), - to=[instance.email] + to=[instance.email], + reply_to=[settings.AUTHORISATION_NOTIFICATION_ADDRESS], ) escapedEventName = re.sub('[^a-zA-Z0-9 \n\.]', '', instance.event.name) diff --git a/RIGS/templates/RIGS/eventauthorisation_request.html b/RIGS/templates/RIGS/eventauthorisation_request.html index 87880331..10a443bf 100644 --- a/RIGS/templates/RIGS/eventauthorisation_request.html +++ b/RIGS/templates/RIGS/eventauthorisation_request.html @@ -5,17 +5,23 @@ {% block content %}
-
+
+
+

Send authorisation request email.

+

Pressing send will email the address provided. Please triple check everything before continuing.

+
+
+
{% csrf_token %}
{% include 'form_errors.html' %}
- -
+
{% render_field form.email type="email" class+="form-control" %}