Add assignment date range.
This commit is contained in:
parent
e1481ce55e
commit
2b1fd9ab90
3 changed files with 17 additions and 4 deletions
|
@ -4,6 +4,8 @@ from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Assignment(models.Model):
|
class Assignment(models.Model):
|
||||||
|
"""A copyright assignment to Conservancy."""
|
||||||
|
|
||||||
full_name = models.CharField(max_length=255)
|
full_name = models.CharField(max_length=255)
|
||||||
email = models.EmailField()
|
email = models.EmailField()
|
||||||
place_of_residence = models.TextField(
|
place_of_residence = models.TextField(
|
||||||
|
@ -20,9 +22,12 @@ class Assignment(models.Model):
|
||||||
choices=[
|
choices=[
|
||||||
('up to this year', 'One-off up to and including this year'),
|
('up to this year', 'One-off up to and including this year'),
|
||||||
('ongoing', 'All existing and new contributions'),
|
('ongoing', 'All existing and new contributions'),
|
||||||
|
('specific', 'A specific period (details below)'),
|
||||||
],
|
],
|
||||||
default='up to this year',
|
default='up to this year',
|
||||||
)
|
)
|
||||||
|
coverage_from = models.DateField(blank=True)
|
||||||
|
coverage_to = models.DateField(blank=True)
|
||||||
attestation_of_copyright = models.BooleanField(
|
attestation_of_copyright = models.BooleanField(
|
||||||
'I attest that I own the copyright on these works'
|
'I attest that I own the copyright on these works'
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,13 +1,21 @@
|
||||||
from django.shortcuts import render
|
from django import forms
|
||||||
|
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.views.generic import TemplateView
|
from django.views.generic import TemplateView
|
||||||
from django.views.generic.edit import CreateView
|
from django.views.generic.edit import CreateView
|
||||||
|
|
||||||
from .models import Assignment
|
from .models import Assignment
|
||||||
|
|
||||||
|
|
||||||
class AssignmentCreateView(CreateView):
|
class AssignmentForm(forms.ModelForm):
|
||||||
model = Assignment
|
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 = [
|
fields = [
|
||||||
'full_name',
|
'full_name',
|
||||||
'email',
|
'email',
|
||||||
|
|
|
@ -33,6 +33,6 @@
|
||||||
|
|
||||||
<p><em>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.</em></p>
|
<p><em>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.</em></p>
|
||||||
|
|
||||||
<p><button type="submit" class="ph3 pv2">Next</button>
|
<p><button type="submit" class="ph3 pv2">Next</button></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue