Changeset - 7374c9f91528
[Not reviewed]
0 2 0
Ben Sturmfels (bsturmfels) - 2 years ago 2021-12-16 23:54:47
ben@sturm.com.au
assignment: Accept current date anywhere on earth.
2 files changed with 10 insertions and 1 deletions:
0 comments (0 inline, 0 general)
www/conservancy/apps/assignment/forms.py
Show inline comments
 
import datetime
 

	
 
from django import forms
 
from django.core.validators import ValidationError
 
from django.utils import timezone
 

	
 
from .models import Assignment
 
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')
 

	
 

	
 
class AssignmentForm(forms.ModelForm):
 
    period_begins = forms.DateField(
 
        label='Assign the copyright in my above contributions starting on',
www/conservancy/templates/assignment/assignment_form.html
Show inline comments
...
 
@@ -9,12 +9,17 @@
 
    <p>By filling in and submitting the below form, you agree to assign your copyrights in the specified projects to Software Freedom Conservancy, which means that Conservancy can enforce the licenses for your code in court, minimizing the need for you to be involved.  Conservancy agrees to keep your code under a free and open source license.</p>
 

	
 
    <p>If you have any questions about assigning your copyright to Conservancy, please don't hesitate to email us at <a href="mailto:copyright-assignment@sfconservancy.org">copyright-assignment@sfconservancy.org</a>.</p>
 

	
 
    <form id="assignment-form" action="." method="post" class="mw7">
 
      {% csrf_token %}
 

	
 
      {% if form.errors %}
 
        <p class="dark-red bg-washed-red pa2 ba b--red br1">Please review the errors below.</p>
 
      {% endif %}
 

	
 
      {{ form.as_p }}
 

	
 
      <p><em>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.</em></p>
 

	
 
      <p><em>After submitting this agreement, if you would like to make any changes, you must let us know within 7 days by emailing <a href="mailto:copyright-assignment@sfconservancy.org">copyright-assignment@sfconservancy.org</a>, which is also where you can reach us if you have any questions.</em></p>
 
      <p><button type="submit" class="ph3 pv2">Submit</button></p>
0 comments (0 inline, 0 general)