diff --git a/www/conservancy/apps/assignment/models.py b/www/conservancy/apps/assignment/models.py index 0b8243a62837f2386ddf5c3daf7384fae4adce1d..c06d5717fd24edf89828033bc7435e276f54de71 100644 --- a/www/conservancy/apps/assignment/models.py +++ b/www/conservancy/apps/assignment/models.py @@ -4,6 +4,8 @@ from django.db import models class Assignment(models.Model): + """A copyright assignment to Conservancy.""" + full_name = models.CharField(max_length=255) email = models.EmailField() place_of_residence = models.TextField( @@ -20,9 +22,12 @@ class Assignment(models.Model): choices=[ ('up to this year', 'One-off up to and including this year'), ('ongoing', 'All existing and new contributions'), + ('specific', 'A specific period (details below)'), ], default='up to this year', ) + coverage_from = models.DateField(blank=True) + coverage_to = models.DateField(blank=True) attestation_of_copyright = models.BooleanField( 'I attest that I own the copyright on these works' ) diff --git a/www/conservancy/apps/assignment/views.py b/www/conservancy/apps/assignment/views.py index b2475d0661d839c4a87165785ba7f7a84ea391c1..4ab306df76a1007f46ff8c7ac75c5ea6b60aea7f 100644 --- a/www/conservancy/apps/assignment/views.py +++ b/www/conservancy/apps/assignment/views.py @@ -1,13 +1,21 @@ -from django.shortcuts import render - +from django import forms from django.urls import reverse_lazy from django.views.generic import TemplateView from django.views.generic.edit import CreateView + from .models import Assignment -class AssignmentCreateView(CreateView): +class AssignmentForm(forms.ModelForm): model = Assignment + coverage_from = forms.DateField(required=False) + coverage_to = forms.DateField(required=False) + + +class AssignmentCreateView(CreateView): + """Show a form for the initial copyright assignment.""" + + form_class = AssignmentForm fields = [ 'full_name', 'email', diff --git a/www/conservancy/templates/assignment/assignment_form.html b/www/conservancy/templates/assignment/assignment_form.html index ed2a07a9fab4e570f61d934c265bbac9feaf810a..376544ae4440d08192ffba504c8574296b4cbb5a 100644 --- a/www/conservancy/templates/assignment/assignment_form.html +++ b/www/conservancy/templates/assignment/assignment_form.html @@ -33,6 +33,6 @@

Please be aware that some employment agreements explicitly transfer copyright ownership to the employer. We recommend you review your recent employment agreements for such clauses.

-

+

{% endblock %}