diff --git a/www/conservancy/apps/assignment/forms.py b/www/conservancy/apps/assignment/forms.py index a55f07a9..1497e978 100644 --- a/www/conservancy/apps/assignment/forms.py +++ b/www/conservancy/apps/assignment/forms.py @@ -1,3 +1,5 @@ +import datetime + from django import forms from django.core.validators import ValidationError from django.utils import timezone @@ -7,7 +9,9 @@ from .terms import TERMS def validate_in_past(value): - if value > timezone.now().date(): + # Adding a day to allow the current date anywhere on earth, regardless of + # the server timezone. + if value > timezone.now().date() + datetime.timedelta(days=1): raise ValidationError('Enter a date in the past') diff --git a/www/conservancy/templates/assignment/assignment_form.html b/www/conservancy/templates/assignment/assignment_form.html index c54355b1..5ef74338 100644 --- a/www/conservancy/templates/assignment/assignment_form.html +++ b/www/conservancy/templates/assignment/assignment_form.html @@ -12,6 +12,11 @@
{% csrf_token %} + + {% if form.errors %} +

Please review the errors below.

+ {% endif %} + {{ form.as_p }}

Please be aware that your employer or a contractor may own the rights in your work by virtue of their employment of you or by explicit transfer of ownership in an agreement. We recommend you review any relevant agreements or consult with a lawyer if you are not sure.