diff --git a/www/conservancy/apps/assignment/forms.py b/www/conservancy/apps/assignment/forms.py index a55f07a9895f980dc5df3c49147b0a55daac23fb..1497e9783ff9a12ef818fa76faa48fa6f77997eb 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 c54355b185cd671392c78921f14af6accd466147..5ef7433866005b059a5b86655a766eaa2c654828 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.