From 530890f6ad9d93984fe58689c90cfdb665f62533 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Fri, 10 Dec 2021 11:33:37 +1100 Subject: [PATCH] assignment: Apply Denver's requested changes. --- www/conservancy/apps/assignment/forms.py | 12 ++++++--- www/conservancy/apps/assignment/models.py | 4 +-- www/conservancy/apps/assignment/terms.py | 18 ++++++------- .../templates/assignment/assignment_form.html | 27 +++++++++++++++++-- .../templates/assignment/base_assignment.html | 2 +- .../templates/assignment/thanks.html | 3 ++- 6 files changed, 48 insertions(+), 18 deletions(-) diff --git a/www/conservancy/apps/assignment/forms.py b/www/conservancy/apps/assignment/forms.py index f6933355..8777e0b4 100644 --- a/www/conservancy/apps/assignment/forms.py +++ b/www/conservancy/apps/assignment/forms.py @@ -13,18 +13,20 @@ def validate_in_past(value): class AssignmentForm(forms.ModelForm): period_begins = forms.DateField( - label='Start of period to assign', + label='Assign the copyright in my above contributions starting on', + help_text='You can use the day you first started contributing (or, equivalently, your date of birth), or any later date.', required=True, widget=forms.DateInput(attrs={'type': 'date'}), validators=[validate_in_past], ) period_end_type = forms.ChoiceField( - label='End of period to assign', + label='and ending on', choices=[ - ('all future contributions', 'all future contributions'), + ('all future contributions', 'all future contributions (no end date)'), ('a specific past date', 'a specific past date (specify below)'), ], widget=forms.RadioSelect(), + initial='all future contributions', ) period_ends = forms.DateField( label='Specific past date (if applicable)', @@ -38,6 +40,10 @@ class AssignmentForm(forms.ModelForm): help_text='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.', ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.fields['attestation_of_copyright'].required = True + class Meta: model = Assignment fields = [ diff --git a/www/conservancy/apps/assignment/models.py b/www/conservancy/apps/assignment/models.py index d7bb22ec..f69965b8 100644 --- a/www/conservancy/apps/assignment/models.py +++ b/www/conservancy/apps/assignment/models.py @@ -31,12 +31,12 @@ class Assignment(models.Model): email = models.EmailField('Email address (to contact you if we have questions)') country_of_residence = CountryField() repositories = models.TextField( - 'Code repositories contributed to that you\'d like to assign', + 'Code repositories containing contributions of yours whose copyright you\'d like to assign', help_text='List of URLs, one per line', validators=[validate_mutiple_urls], ) all_emails = models.TextField( - 'All email addresses and/or names used by you to contribute to the above', + 'All email addresses used by you to contribute to the above (i.e. in the commit logs)', ) period_begins = models.DateField( 'Assignment period begins', diff --git a/www/conservancy/apps/assignment/terms.py b/www/conservancy/apps/assignment/terms.py index 0d0e56d9..75549e2e 100644 --- a/www/conservancy/apps/assignment/terms.py +++ b/www/conservancy/apps/assignment/terms.py @@ -94,8 +94,8 @@ TERMS = textwrap.dedent("""\ asserted by or paid to any party on account of a breach or alleged breach of the foregoing warranty. Assignor makes no other express or implied warranty (including without limitation, in this disclaimer of warranty, - any warranty of merchantability or fitness for a particular - purpose). + any warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE). Exhibit A @@ -112,10 +112,10 @@ TERMS = textwrap.dedent("""\ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - The software is provided ``as is'', without warranty of any kind, express or - implied, including but not limited to the warranties of merchantability, - fitness for a particular purpose and noninfringement. In no event shall - the authors or copyright holders be liable for any claim, damages or other - liability, whether in an action of contract, tort or otherwise, arising - from, out of or in connection with the software or the use or other - dealings in the software.""") + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE.""") diff --git a/www/conservancy/templates/assignment/assignment_form.html b/www/conservancy/templates/assignment/assignment_form.html index 753cd427..ea13b9a1 100644 --- a/www/conservancy/templates/assignment/assignment_form.html +++ b/www/conservancy/templates/assignment/assignment_form.html @@ -10,11 +10,34 @@

If you have any questions about assigning your copyright to Conservancy, please don't hesitate to email us at info@sfconservancy.org.

-
+ {% csrf_token %} {{ form.as_p }} -

+

+ + {% endblock %} diff --git a/www/conservancy/templates/assignment/base_assignment.html b/www/conservancy/templates/assignment/base_assignment.html index 6aec1c42..1af63a6c 100644 --- a/www/conservancy/templates/assignment/base_assignment.html +++ b/www/conservancy/templates/assignment/base_assignment.html @@ -26,7 +26,7 @@ } textarea { width: 100%; - max-width: 35rem; + max-width: 45rem; height: 8rem; padding: 0.25rem; } diff --git a/www/conservancy/templates/assignment/thanks.html b/www/conservancy/templates/assignment/thanks.html index 86be3ba4..e8be9ec9 100644 --- a/www/conservancy/templates/assignment/thanks.html +++ b/www/conservancy/templates/assignment/thanks.html @@ -6,7 +6,8 @@

Thank you for assigning your copyright to Software Freedom Conservancy! We have recorded the below information regarding the assignment and the works.

-

If you would like to make any changes, you must let us know within 7 days by emailing info@sfconservancy.org. Thanks for helping us enforce free and open source software licenses!

+

We will be sending out verification emails to the email addresses you used to contribute, as specified below, in the coming weeks. Please follow the instructions there to complete the verification at that time.

+

If you would like to make any changes, you must let us know within 7 days by emailing info@sfconservancy.org, which is also where you can reach us if you have any questions.

{{ form.as_p }}